Fork me on GitHub

Client libraries



Some client libraries have been developed by me or by other developers. If you have developed a library, or if you do something cool with Gisgraphy, please let me know, I would be glad to see it. Here are the libraries currently available :

OpenGTS

Gisgraphy is supported by OpenGTS. That means that you can do geocoding on OpenGTS via Gisgraphy. (see doc)

Java

Some Java clients (one per services) are available in Gisgraphy-utils package.

Javascript

Gisgraphy has a JS api and some leaflet plugins.


Python

A client library is available. The code is available on the Github repository. Some other contributions are also be done by the Gisgraphy community : https://github.com/JeffAMcGee/localcrawl/blob/master/gisgraphy.py. You can also try to use Java class in python with jython

Scala

A client library developed by third party is available. The code is available on the Github repository

PHP

I suggest you use the Restclient library available in the GIT repository.
. Note that curl is required by the Restclient library.
<?
// dummy examples of Gisgraphy query. 

//geocoding
$query = RestClient::get("http://services.gisgraphy.com/geocoding/geocode",
	 array('format'=>'php',
		'address'=>'1 avenue des champs elysees 75003 paris',
		'country'=>'FR'
	      )
);
//address parser
$query = RestClient::get("http://services.gisgraphy.com/addressparser/parse",
	array('format'=>'php',
	      'address'=>'1 avenue des champs elysees 75003 paris',
	      'country'=>'FR'
	     )
);
//street search
$query = RestClient::get("http://services.gisgraphy.com/street/streetsearch",
		array('format'=>'php',
			'lat'=>'48.8534088134765',
			'lng'=>'2.34879994392395',
			'name'=>'Champs'
			)
);
//fulltext
$query = RestClient::get("http://services.gisgraphy.com/fulltext/fulltextsearch",
		array('format'=>'php',
			'q'=>'paris'
			)
);
//geoloc-find nearby
$query = RestClient::get("http://services.gisgraphy.com/geoloc/search",
		array('format'=>'php',
		'lat'=>'48.8534088134765',
		'lng'=>'2.34879994392395',
		'placetype'=>'city')
);


var_dump($query->getResponse());
var_dump($query->getResponseCode());
var_dump($query->getResponseContentType());

//Note that 'format'=>'php' is in case you want to do something like :
//eval("\$str =$query->getResponse()");echo (print_r($str));
//feel free to use xml, json, any format you want.


?>