Draw path in MKMapView using Google Map - ios

I implement MKMapView in my application to draw a path between two place,i found all lat long between two point using google map API but it shows the path through road.
My problem is that i want to show the path in building,
For example:
I want to draw path between the gate1 to gate 2 of Building, i pass the "to and from" lat-long in to the google MAP API, it shows the path through road so it shows the wrong distance.
I tried the indoor map also but it works only in register buildings.

Related

How to determine given coordinates are overlaps on polyline route google maps iOS?

I need to find a path between 2 locations. I have a polyline on google map and after give another 2 location points(draw a polyline), is it possible to know the new polyline is overlaps the previous polyline. Or is there a way to determine those new coordinates are on previous polyline. I've googled many times and there is no solution found. Thanks in advance.

Drawing polyline in realtime

I'm fairly new to ios and I would like to know what would be the best approach to draw polyline on google map while user is on the move. So it would only show the path the user has traveled. I'm thinking about using current location as the destination and redraw the polyline as user moves.
EDIT : I'm not even sure if google map is the way to go for this particular scenario since this app is free and there will be fee for API call over 2500 times/day. Is it better to go with Apple Map?
Following these guidelines:
You need to create a GMSMutablePath and add the current user location. As the user moves you add more coordinates to the GMSMutablePath.
When you need to draw the line just instantiate a new GMSPolyline object and set the map property of the GMSPolyline removing the previously drawn polyline setting it's map property to nil.

GoogleAPI Marker not allowing on Ocean or See

I want to put a marker on a GMSMapView. But i don´t want that the marker will be displayed on ocean or see, only earth. I searched but i don´t find an attribute or method to detect if the surface on GMSMapView is see, ocean or earth. If there is propositions? I worked under XCode, and language Objective-C.
Do you need this to be global or is there a specific location you need?
You can use Google Maps Elevation layer to get if this location is above or below sea-level.
But some places have land that is below sea-level, so this solution would not always work.
https://developers.google.com/maps/documentation/elevation/intro

Drawing Polyline on an ios Mapview

In my Xamarin ios app I have to draw the path as user walks,
I am planning to do this by drawing Polyline to a Map view by fetching Lattitude & Longitude from CClocationManager, But I have to deal with N number of Lattitude & Longitude in this case,
Is there any simple approach to do this? In our scenario We won't be knowing the destination , User will Just start a run from a point and we have to track his path on map by drawing a line, How could I do this?
A possible solution could be to save the current last known position, which also represents you endpoint of a polyline. On a location change use it as a starting point for the next polyline. That way you draw the route with multiple polylines piece by piece.

How to show indoor annotations on MKMapView

I need to show an indoor floor plan in a MKMapView. So far I have managed to load custom map tiles into MKMapView. But when I try to show annotations it does not show in correct location. The space between latitudes are not equal. I think it’s because MKMapView maps the globe into flat surface. But in my case I need to show annotations in a flat surface. Any idea how to do this?
EDIT : Anyone know how to convert geographic coordinates to cartesian coordinates? That will solve this problem
Apple just updated its demo project:
https://developer.apple.com/library/prerelease/ios/samplecode/footprint/Introduction/Intro.html
Take a look, there are information about how to translate geolocation (spherical) to flat location.

Resources