1

I built a fun project called poorsquare.us and I'm looking to add a simple mobile map component to it without actually building an app.

Note: This is just a simple webpage (not a native iphone app)

I want to display a link on mobile safari (iphone) that, when clicked, sends the user to the maps app with multiple waypoints, walking directions, optimized for travel and with custom labels.

So far this link will take me from safari into the maps app, but I'm not sure what parts of the URL to change to get the labels working, if that's even possible.

http://maps.google.com/maps?saddr=40.78817,-73.97635+(blah)&daddr=40.7979,-73.9636+(dsatsda)+to:40.7924,-73.9666&hl=en&ll=40.793409,-73.969982&spn=0.014523,0.024719&sll=40.79029,-73.971484&sspn=0.014524,0.024719&geocode=FcpgbgId4jWX-w%3BFcyGbgIdsGeX-w%3BFVBxbgId-FuX-w&vpsrc=0&dirflg=w&mra=ls&t=m&z=16

what i'd like is for the link to:

  • sense the current GPS (so "sensor=true") as the starting point
  • set up many (like 10-25) different waypoints that are displayed in the map app.
  • for each waypoint i can provide: title, lat/lon, text address - i'd like the title to be displayed on the pin (right now it's just saying "86 street" or something generic like that)
  • i'd also like to provide text information (so when you click the pin, and then click the little right arrow, it opens the address info screen - in that area i'd like to put a description
  • and mode=walking

i'm not sure what the other params are in the url above (which i basically took from the google map directions from my browser).

duncan
  • 31,401
  • 13
  • 78
  • 99
Jeff
  • 717
  • 2
  • 8
  • 19

1 Answers1

0

I'd say direct to a page to get the users location first using HTML5 components, then redirect to the maps app with the returned coordinates. You'll need the coordinates first before pointing to the map app.

http://dev.w3.org/geo/api/spec-source.html

For walking directions use the param:

dirflg=w

Having custom pins like that won't work without a native app though...

Mat
  • 202,337
  • 40
  • 393
  • 406
James Richard
  • 1,525
  • 12
  • 18