Cities searchengine
It is very difficult to find advanced geolocation services on the Internet. Google offers a solution, but it may not be suitable for advanced needs such as distance calculation, radial cities search, ...
To counter this problem, I developed this search engine. The GUI is volontary neglected to let third parties use it as a data source. For this reason, results are thrown in JSON format.
Search for cities
To search for cities, you will only have to access the following URL using POST method:
http://www.lapinbleu.ch/BBcities/searchcities_frm.php
The only parameter you will have to pass is the "search query" in JSON format
This parameter is named SQ and is construct that way:
Example:
[["geoCityName","LIKE","Lau%"],
["geoCityCountryID","=",204],
["geoCityElevationfeet",">","4800"]]
The search request can handle N criterias on the differents rows of the table: geoCityID, geoCityName, geoCityCountryID, geoCityLatitude, geoCityLongitude et geoCityElevationfeet.
The request is construct that way
[[criteria1],[criteria2],...]
Each criteria is defined that way:
["rowname","search method","value"]
The rowname can handle any of the table rows. The search method can handle all of the supported MySQL values (LIKE, =, >, <, ... ). The value depends of the selected row.
A form has been developped to handle quick requests, but the goal of the API is not to be mainly used like that. The users are mainly web developpers who are integrating this solution to their multimedia services.
http://www.lapinbleu.ch/BBcities/searchcities_frm.php
Radial search
To do a radial search, you will only have to POST a few parameters to this URL:
http://www.lapinbleu.ch/BBcities/searchcitiesByRadius_frm.php
The parameters to pass are the following:
- geoLat: defines the latitude of the center of the disc
- geoLong: defines the longitude of the center of the disc
- geoDist: defines the radius of the disc
A form has been developped to do quick queries, but the goal of the API is not to use it like this. The users are mainly web developpers who are integrating this solution to their multimedia services.
http://www.lapinbleu.ch/BBcities/searchcitiesByRadius_frm.php