Best solution for iOS Mapping multiple latitude and longitude points - ios

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.

Related

How to get near by places in radius of 2 kilometer from current location without using Google API in iOS Objective C

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.

how to display routing data online (with the lines between points)

I have a set of routing data, in both CSV or KML format. It is basically a list of Lat / Lon and some supporting information.
I am looking for a way to display this as a route (e.g. with lines between the points in the order they appear in the list) online. Ideally a free option, as I'm not likely to need it again in the near future.
I have found hundreds (maybe an exageration) of ways of plotting the points, but not one that will include the lines. I'm trying to avoid the long and tedious process of converting one of these to an image and drawing the lines by hand.
Can anyone suggest such a site?
This question was asked on a google group for google maps. The user received an answer that pointed him towards the google map API. Given how other apps / web pages do this using google maps (never seen it done any other way) I would imagine this would be the best route to go down as its probably something they have built into the service.
https://groups.google.com/forum/?fromgroups=#!topic/google-maps-js-api-v3/F_iroBiBeww

Scalable solution for geocoding on iOS

I'm working on an iOS app that pulls events from Google Calendar and subsequently generates pins on a map for each event (based on what the event creator fills in for "Location"). The user can select a date range (today, this week, this month, etc.) and see all the events taking place near them over that period.
Problem 1: The app is for my local university, so a majority of the locations will be buildings on campus. These buildings have inconsistent addresses that are often difficult to find, so it would be good if the location "Foo Hall" would result in a pin on that building. Google Maps is capable of doing this, however Apple Maps has no knowledge of the buildings on my school campus.
Problem 2: In an ideal situation, thousands of students would be using this app. Each time they open the app, they could be viewing dozens of pins. Therefore, I'm worried that I may be pushing the limits imposed by Google's geocoding API (definitely the 2500 request limit, and maybe even the 100,000 request limit for the Business API).
So my question is... what would be the best solution for these two problems? Should I create a local database for building names and map them to coordinates? Or is there a way I can overcome the limitations of Google's Geocoding API? Is there a better solution I'm not thinking of?
Thanks for any help!
I would use latitude and longitude coordinates for the buildings and allow for people to add locations to the database if they are meeting somewhere that you have not added already. This way, the pins will drop in the center of the building if you want them to, because you are not relying on an address or on looking up a building name. You simply know that "Foo Hall" is at X latt. and Y long. And if someone selects "Foo Hall" or sees an event at "Foo Hall" there is a perfectly placed pin right in the middle of it on the map. I don't think you need to worry as much about the geocoding API if you are using hardcoded locations for the buildings either, because you won't have to be polling Google to get the building locations.
I would also use some sort of server to store the building locations so they can be updated or added to, either by you or by the users.
That's how I would handle it, good luck!

How do I determine if a user is traveling along a specified route and in which direction?

Assume I have established a navigation route on a service like google maps. How do I determine if a user is traveling along that route and in which direction? Sort of like a GPS device knows if you are following the specified route or not, but also with heading info.
I'm a python hacker, but examples or resources in any language would be fine.
Thanks in advance!
You would have to log a users current geolocation and the timestamp of that entry intermittently, say every ten seconds or so.
At that point you would then have the information you need to calculate and get the final data that you need.
A good place to start is the calculating bearing section in Calculate distance, bearing and more between Latitude/Longitude points.

Bing API for finding nearby cities

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

Resources