iOS Native Maps URL scheme multiple pins - ios

I am using PhoneGap to build applications for iOS and Android.
I want to open the native map application on iOS with multiple pins. I am able to open the native map on iOS device using their Maps URL scheme using a ?q=lat,long parameter
http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html
Is it possible to open the native maps app and showing multiple pings instead of only one?
I have tried enough to search for it but there isn't enough documentation to answer my question.
Thank you for the help

Create an MKMapItem for each pin you want to display, save the MKMapItems to an array, and then use openMapsWithItems:launchOptions: to send the array to the Maps app. The Maps app will display a pin for each item in the array.
I have not used this myself, but it's from Apple's documentation at:
http://developer.apple.com/library/ios/documentation/MapKit/Reference/MKMapItem_class/Reference/Reference.html#//apple_ref/occ/clm/MKMapItem/openMapsWithItems:launchOptions:

Related

Opening 'comgooglemaps://' uri is opening another app. - iOS

While opening google maps in iOS by using scheme comgooglemaps:// , It is opening another app named Pitch Gauge. I also confirm that Google Maps app is installed in my iPhone. Still its not picking the url scheme of Google Maps app and trigerring for Pitch Gauge App.
I am using the code given below with cordovaInAppBrowser.
cordova.InAppBrowser.open( "comgooglemaps://?q=" + address, "_system");
Want to know if there any change in URL scheme in iOS for redirecting to Google Maps. Or there's any need to make change related scheme url in iOS?

How can my app (iOS) open a location from Google Maps' Share button?

Using the Google Maps app on iOS, when I tap the share button it will show me a list of apps to open that location with.
My question is, how do I get my app to be in that list? I'm guessing a custom URL scheme, but then, what is that scheme?
I'd like to be able to import a location into my app relatively easily for the user.
That would be a App Share Extension
App Extension Programming Guide Share Extension
Hope this helps :)

What is the best way to launch either Google Maps or Apple maps with an existing KML file from your iOS app?

The situation:
I'm writing an app that uses a lot of GPS data as part of its core functionality. In my iOS app, I'm downloading some kml files from our backend/S3. That is all working fine. I have the filepath of the downloaded kml file available on the device.
I need a way to launch either Google Maps or Apple maps with this kml file data from my app (either using UIApplication.shared.open(... method for google maps, or mapItem.openInMaps(launchOptions: options), or similar).
I'm writing in Swift.
I haven't seen much recent documentation on how to do this, either from Google or Apple Maps. Any ideas?

Swift 3 .If I will use google Maps in my project (google sdk) will the user need to instal google maps before using it?

Swift 3. If I use google Maps in my project (google sdk) and whenever user will open View Controller with this maps will the user need to download google maps or it will work straight away even if user haven't got installed google maps?
Thank you
If you use Google Maps in your application through the SDK, there is no requirement for the user. They don't need to have the Google Maps app on their phone.
So yes, it will work straight away.
The only things you need to make sure is to make sure you configure the SDK as described in Google's SDK Start Guide and that you have an API key requested from Google and configured it in your app.
Size impact
It is hard to say how the Google SDK impacts the size of your app, because Apple does a lot of optimization (e.g. If you allow App Thinning it might be a lot smaller). I think for my apps it makes about a 3-10 MB difference.
iTunes Connect allows you to inspect the estimated size of the app. The screenshot is from an app I worked on that uses 13 different pods, including Google Maps.
In order to see this go to iTunes Connect > [Your App] > Activity > All Builds > [Select a Build] > App Store File Sizes

MobileFirst on iOS: start Google Maps and let user return

I use a standard Maps protocol for iOS in my MobileFirst 7.0 hybrid app:
...
The Google Maps app opens correctly, however there is no possibility to return back to my app. The iOS apps list shows my app icon with Google Maps screen. The Google Maps UI has no exit button to return back. I would expect there to be two separate processes: my app and Google Maps.
Am I doing anything wrong or is this intended? If so, how should one go about something like this?
Per the Apple guide, this will open either Safari or the Maps app. It does not mention anything on returning back to the app, so that's just that: https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html
Edit: but to get it to work in web apps, like in the case of IBM MobileFirst, where the app is rendered in a WebView inside an app, you should not follow Apple's guidelines to use a URL such as: http://maps.apple.com?q=... but rather only maps:q=....
By using the second option the actual Apple Maps app will launch instead of replacing your app with Google Maps.

Resources