Discussion Forums  >  Maps, Device Location, Tracking

Replies: 5    Views: 166

trailman
Aspiring developer
Profile
Posts: 280
Reg: Dec 10, 2010
Sedona, az
6,550
01/23/13 06:20 PM (11 years ago)

Native App Plugin Question

If I enter this: http://maps.google.com/maps/ms?authuser=0&vps=7&ie=UTF8&msa=0&output=kml&msid=215103748627704014967.0004af366c84b1c00f86b Into the Native Maps (or Google Maps) Application to Launch. For once things couldn't be more perfect on Android. Everything shows up. Driving directions and a map with the users location too. Great work!!! BUT...In IOS it wants to open Google Earth and things look pretty good but if the user doesn't have google earth I get "Safari Cannot download this file." Google maps is installed on the device but no luck. If I enter googles new url scheme (same map, different url): https://maps.google.com/maps/ms?msid=215103748627704014967.0004af366c84b1c00f86b&msa=0 Doesn't work in maps in android. Kind of works in IOS. Works on my old ipod touch but not on iPhone 4. Maybe this screen wasn't designed to work with this kind of tracked map? That's fine I was just wondering what's up.
 
Cakebit
Code is Art
Profile
Posts: 501
Reg: Dec 15, 2010
In your local b...
16,510
like
01/23/13 07:28 PM (11 years ago)
Ok This problem is a little tricky... As Apple uses Apple maps on IOS and not everyone has Google maps for the iPhone you have to use a workaround. As you probably don't want to redirect to an HTML page which then choses either to open Google Maps or Apple Maps, All I can do is prepose a workaround... If you edit your url to: http://maps.apple.com/maps/ms?authuser=0&vps=7&ie=UTF8&msa=0&output=kml&msid=215103748627704014967.0004af366c84b1c00f86b (Replacing Google with Apple) On IOS it will open Apple Maps, or it can open Google maps and on Android it will open Google maps. How this works is Apple recognizes the maps.apple.com url! Android does not so it should redirect to Google maps. If you click the url http://maps.apple.com/maps?q=hotels&hl=en&ll=37.996163,-119.311523&spn=10.28005,23.269043&sll=37.269174,-119.306607&sspn=10.381094,23.269043&oq=h&hq=hotels&t=m&z=6&iwloc=B</a> (notice the Apple in the url) Apple redirects this link to Google... that is all maps.apple.com does! So on Android the url I gave you changes to http://maps.google.com/maps/ms?authuser=0&vps=7&ie=UTF8&msa=0&output=kml&msid=215103748627704014967.0004af366c84b1c00f86b and should work perfectly :) Let me know what works best :)
 
trailman
Aspiring developer
Profile
Posts: 280
Reg: Dec 10, 2010
Sedona, az
6,550
like
01/24/13 01:15 PM (11 years ago)
What a great tip. It works for android perfectly but for apple it just gives me a map of N. America with a blue dot with my location. There is no map of the trail. Since the map is a (tracked) google map how can it know to overlay a google map on an apple map? Thanks, Bruce
 
Cakebit
Code is Art
Profile
Posts: 501
Reg: Dec 15, 2010
In your local b...
16,510
like
01/24/13 02:26 PM (11 years ago)
Hi Bruce... I checked and you are using a KML file... I will need to see how to enter the KML information in Apple or Google maps for IOS...
 
Cakebit
Code is Art
Profile
Posts: 501
Reg: Dec 15, 2010
In your local b...
16,510
like
01/24/13 02:28 PM (11 years ago)
It looks like Apple maps may not take KML you may need to try using the url scheme here http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html I will still keep my eye open :)
 
trailman
Aspiring developer
Profile
Posts: 280
Reg: Dec 10, 2010
Sedona, az
6,550
like
01/28/13 03:51 PM (11 years ago)
I'm not going to include any tracked maps. It's too much work to get it working. I'd probably have to hire someone to get it to work. I'll just include maps to the start of the trail. Thanks for your help. Bruce
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.