Can I import a custom Google Map into iOS MapKit? - ios

Let's say I have a custom fictional map create with Google maps. It is not a real place, but a custom one. Kind of like a map of the lord of the rings location, mordor or something. Working as a Google map on browser, with pins, custom image and all. Is there a way to import this to iOS MapKit to show in my own iOS app?

You could try to export the google map in KML format and then use a library to parse the KML data and view it in a MKMapView.
This seems to be useful: http://kmlframework.com

Related

Offline mapping tile creation

In one of my iOS application I want to show an offline indoor map with navigation. I searched it in google and then I found solutions like routeme, mapbox etc .But the thing is I have to do this without any external libraries for that I did a sample project using mktileoverlay and it is working fine with that sample map. My problem is how I will make tiles for my indoor map with the proper structure and how to do navigation with that map. Thanks in advance.

Can I animate my mapView like with SatNav

I'm using MapKit to load a MKMapView and loading KML files to display a route with polylines between the designated points. I've seen a similar Android app using Google Maps that animates the route and runs it from start to finish.
I've been through the MapKit Framework documentation and I can't find anything that suggests I can do the same thing using Apple Maps.
If I'm wrong and it is possible I would be grateful for any information
The only way to resolve this issue is import the Google maps framework, which works perfectly well alongside MKMapkit.
There is a facility within Google Maps that enables the developer to animate their route.

How to set padding on map view (Mapbox-ios-sdk)

Does anybody knows how to set the padding on a MapBox mapView as Google Maps iOS SDK does?.
This example belongs to google maps iOS sdk 1.7.2 (VisibleRegionViewController).
What I want to do is to replicate the overlay view on MapBox SDK for iOS so I can keep the MapBox watermark logo visible when an overlay view is over the mapView.
I contacted MapBox support with the same question in 07/2014 and this was the response:
"Hi, No, there is no documentation for either of these use cases as they are somewhat custom.
We might add this sort of functionality in the future, but it's not there right now."
It looks like they don't provide a Google Maps equivalent of "padding".

adding annotations to offline map (tilemil)

I'm using tilemil to create offline map for my iPhone app. I've added annotation to map through GEOJSON, and everything works great, but i have one question: how can i create and hook up annotations that is created in offline map with app annotations. Because annotations that is created in offline map showing as dots in my app.
Example:
what i have:
what i want:
should i just parse GeoJSON and add annotations with data this way, or there's some better approaches to do this? Thanks!
If you have implemented the points in TileMill, then their imagery will be "baked into" the map raster tile imagery. You can still have callouts for these if you also add interactivity to the map in TileMill so that tapping the points can retrieve data. A good example of doing this for regions instead of points is in the third tab of this sample project, as shown in the screenshot:
https://github.com/mapbox/mapbox-ios-example
Another option, as you've mentioned, is to just parse the GeoJSON client-side using NSJSONSerialization and then adding the points in Cocoa as RMAnnotation objects.
A third option is to add the markers in the mapbox.com editor interface and save them with your map, then you can retrieve them as simplestyle data automatically as in the Weekend Picks sample project that you've included a screenshot of. The GeoJSON can be automatically retrieved, parsed, and added as annotations in the project by the iOS SDK.

MapKit with UISearchBar

So if I understand correctly you can no longer use certain Google APIs with iOS (ex. Google Places). So how can we use the iOS MapKit with a UISearchBar to search for locations? The map on my iPhone has a searchbar so if I, for example, type coffeshops I get all the pins in my area of local coffesshops. If Apple is not using Google APIs what are they using to find this data? How can we developers tap into this search data?
Thanks,
MapKit contains a search request to replace the outgoing Google APIs.
https://developer.apple.com/library/ios/#documentation/MapKit/Reference/MKLocalSearchRequest_class/Reference/Reference.html#//apple_ref/doc/uid/TP40012892
I have a small app with this feature.
Github: https://github.com/galahador/MapTag
UISearchBar - when you input data in bar, it shows on a map with a pointer (pin)
If you need any help, I can show code and explain everything.

Resources