Whenever we use the geolocation api we get a number like 3.234345 for latitude and longitude which basically describes our position.
Is the number in radians ? what exactly is this number and what does it mean.
Sorry I tried searching a lot of places but could not find an answer,
Would appreciate it if some one can help me understand
I finally figured it out. It is called Decimal Degrees and is used by Apple , Google maps etc.
http://en.wikipedia.org/wiki/Decimal_degrees
Related
I'm using Google places autocomplete iOS API (as instructed here)
I need to sort the results to show the nearest places first.
Can I do this using the iOS API? if yes, please point me to a reference or something.
Thanks
I think the easiest is to get the user's location, then calculate the distance between each point and the user like this
Calculate distance between two place using latitude-longitude in gmap for iPhone
then order it by the distance.
I am developing a Map based iOS app in Objective C. Basically what I need to achieve is to get the details data of suggested location that is within 5 kilo meter to the current user location without using Google API. I have searched a lot but could not find any answer to my question.
I tried below links related to my problem but could not get satisfactory solution :
how to find nearest latitude and longitude form current place?
get nearest locations from my current location
http://api.geonames.org/findNearbyPlaceNameJSON?lat=12.9972&lng=77.6143&radius=5&username=demo
How to get the nearest area from a list of locations?
I want to know if there is some other good and efficient approach (free).
Thank You !
If you have the coordinates of all the places you want to search from in database, then you can implement Haversine formula in sql query and this will return results within the specified distance as in your case 2km.Refer to this link for detailed information.
What would be my best option if i want to map multiple lat, longs onto a map within an iOS App?
I have hundreds of points captured from a GPS receiver over an hours walk. Does anyone have any thoughts on how to best ingest all these points and spit out a map with the exact route followed??
Any help with this would be great. Is there anyway i can provide all the data points to the Google Maps API and they return a map plus meta data for things like total distance?
What have you tried so far? What part are you unsure about? How do you want to display the route and when?
As far as I understand, you are saving coordinates to a database at a defined interval. We don't know at what frequency. You will be able to display each point on a map, and eventually link them alltogether with a polyline. But that won't follow roads. For this you would need to use the Directions service. But this service has limitations:
You cannot assume that giving the service your start and end coordinates it would calculate the same route that you followed.
You can give the service a few waypoints but you are limited to 8 waypoints per request (with the free API).
The free API allows for 2500 requests per day / 10 per second.
Let me know if there is anything else I can help you with.
I'm writing an iOS application and it would be very handy to know the way to find a nearest business name (and especially business type, such as restaurant/hotel/store etc.) by a GPS coordinate, or at least by an address.
So just curious, is there such API/Web service out there?
Yes
Bing
Google Places
Yahoo Geo Technologies
I'm sure there are loads more to be found with a quick google
OK, it seems like I have to answer my own question. I didn't try it out in code, but the answer is here:
http://code.google.com/apis/maps/documentation/places/
Unfortunately there seems to be a cap on how many times Google places API can be called (for free), i.e. 1000 times per day (for the same API_key.)
Is there a Bing API for finding nearby cities given a city name or lat/long combination?
I don't know if Bing provides this, but you build your own from the data available from geonames.org
They provide an API to get places near a given lat/lng: http://api.geonames.org/findNearby?lat=47.3&lng=9&username=demo
Or you can also go all out and implement a solution for your own needs using their data, as per this answer: Given the lat/long coordinates, how can we find out the city/country?
I think this is what you're looking for: Bing Maps API Sample
The short answer is no, there is no Bing API for finding nearby cities.
That said, it would be possible to 'cook your own' using the existing APIs. However, one thing that would need clarification is what 'nearby' means. I presume you mean within a specific radius of a given point (determined by a city name or lat/long combination).
Using the Bing Api it would be fairly trivial to implement an algorithm to reverse geocode a location and then test for places within x distance.
Failing that, you could use something like geoPlugin, it is free and you can put it on your sever - thus avoiding 3rd party up-time issues.
http://www.geoplugin.com/webservices/php#php_class
Take a look at the nearby places features, this does exactly what you want.
http://www.geoplugin.com/webservices/extras
No, there isn't. However, it's relatively simple to get the bounding box for a given coordinate and then use the Bing Maps API with that. I'm doing this and used this solution to get what I needed...
https://stackoverflow.com/a/14314146/73680