0

I'm developing a CMS that will be used to insert places / venues and I need a world database to connect places to. That data will be presented on a mobile application.

I've looked into free world databases, but I'd like to have something google-compatible and frequently up to date.

For example, I'd like to be able to get a list of all the countries and cities in the world with their coordinates, area coordinates etc and store it in a database.

Sample request:

http://code.google.com/worldapi/getcountries

http://code.google.com/worldapi/getcities?countrycode=ru

Something like that.

4

1 回答 1

1

While you can't store the data directly, you can link to Google's information about places using the Google Places API.

For example, by storing this reference:

CmRYAAAAciqGsTRX1mXRvuXSH2ErwW-jCINE1aLiwP64MCWDN5vkXvXoQGPKldMfmdGyqWSpm7BEYCgDm-iv7Kc2PF7QA7brMAwBbAcqMr5i1f4PwTpaovIZjysCEZTry8Ez30wpEhCNCXpynextCld2EBsDkRKsGhSLayuRyFsex6JA6NPh9dyupoTH3g

You can look up the details with a HTTP GET:

https://maps.googleapis.com/maps/api/place/details/json?reference=CmRYAAAAciqGsTRX1mXRvuXSH2ErwW-jCINE1aLiwP64MCWDN5vkXvXoQGPKldMfmdGyqWSpm7BEYCgDm-iv7Kc2PF7QA7brMAwBbAcqMr5i1f4PwTpaovIZjysCEZTry8Ez30wpEhCNCXpynextCld2EBsDkRKsGhSLayuRyFsex6JA6NPh9dyupoTH3g&sensor=true&key=AddYourOwnKeyHere

You'll need a Places API key (activate at http://code.google.com/apis/console). Check the documentation for more detail.

于 2013-08-19T22:48:14.893 回答