Google Maps - Get cities by country - ios

I want to list all cities by country, also get latitude and longitude of the city.
How can I do this by google maps?

how about using a data source instead? something like http://www.geonames.org/ ?

Related

Canada and US GEO coordinates cities Lat and Long database table

I'm working on a simple BI map chart using Metabase and I need to show the orders and customers by City.
I need to get one table,csv or Json file from Cities on Canada and US.
Example:
Example Canada Vancouver
Richmond LAT:49.17405764459043,LONG:-123.13465522094917
Vancouver LAT:49.28326571687911,LONG:-123.13001443031924
Burnaby LAT:49.24892902969132,LONG:-122.98271933450602
I need to create one table in Database and populate with our Latitude and Longitude.
I have for Provinces, but I need by Cities.
Unfortunately we don't Insert this information's in Customer SignUp or Orders.I need to create a table and Join by City.Name and get the Lat and Long to show in the chart.
Where Can I Find? Everybody know? I know the Google GeoCoordinates but I need one table with all informations.
Hi guys. I'm working on a simple BI chart using Metabase and I need to show the orders and customers by City.

How to get nearby places using the geonames API?

we are trying to get nearby locations using the geonames API, we have used /findNearbyPostalCodes and /findNearbyPlaceName and /findNearby for example but we are getting some locations like parks and hotels, instead we want to get cities and populated locations, is there any way to do this ? Thanks.

Google Maps SDK iOS Easy way of getting Capital Cities with Longitude and Latitude

Is there an easy way to get a list of Capital Cites with their latitudes and longitudes?
I am just displaying a google map view and I would like to display markers for capital cities.
You can use google location api service, it is free up to 2,500 url calls per day, here is the link for further information.
And all capital cities latitudes and longitudes are listed in this website:
Edited:
You could use plist directly from this website:
How to parse dictionary object.

Given longitude and latitude, how to find country

If I have a latitude and longitude, how do I find out the country of that location..
If found out about Google Reverse Geocoding, but unfortunately, it requires the service to be used along with Google Maps, which is not my case..
Is there a static database or something which I can refer to? It would be better if I have a static database as opposed to a service..
Without a service, it is a lot of work.
First, you need the country polygons with assigned country codes. One country will have on average approx 50.000 vertices.
Then it's a simple point-in-polygon search.
Use a spatial index to limit the country polygon to search.
It becomes a bit more difficult if you have to consider enclaves.
You can use Bing Maps Api, it doesn't require displaying maps as far as I know,
http://dev.virtualearth.net/services/v1/geocodeservice/geocodeservice.asmx/ReverseGeocode?latitude=22.98&longitude=35.43637&key=[YOU_KEY]&culture=%22en-us%22&format=json
You can use the geonames.org "Country code / reverse geocoding" webservice, for example:
http://api.geonames.org/countryCode?lat=47.03&lng=10.2&username=demo
-> AT

Finding nearby addreses by geo location in rails

I have stored users - including their addresses - and need to find all users who live within a certain distance of a specific location.
I am using geocoder and have stored longitude and latitude in the Users table.
How do I find these user?
To do a query based on lat/lon, do this:
User.near([39.41, 90.23], 10)
That will find users within 10 miles of the lat/lon pair.
Here are the docs: https://github.com/alexreisner/geocoder

Resources