Richard Wagner
"Professional iPhone and iPod touch Programming: Building Applications for Mobile Safari"
userAgent.indexOf(???iPhone??™) != -1)??? href=???mailto:jack@ibmcorp.com???>
jack@ibmcorp.com
Pointing on Google Maps
While Google Maps does not have its own custom href protocol, Mobile Safari on iPhone is smart
enough to reroute any request to maps.google.com to the built-in Maps application rather than going
to the public Google Web site. (On iPod touch, Mobile Safari links directly to the public Google Web site.)
As a result, you can create a link to specify either a specific location or driving directions between two
geographical points.
You cannot specify whether to display the map in Map or Satellite view. The location you specify will be
displayed in the last selected view of the user.
Keep in mind the basic syntax conventions when composing a Google Maps URL:
??‘ For normal destinations, start with the q= parameter, and then type the location as you would a
normal address, substituting + signs for blank spaces.
??‘ For clarity, include commas between address fields.
Here??™s a basic URL to find a location based on city and state:
BostonHere??™s the syntax used for a full street address:
Jack
Armitage??™s OfficeChapter 7: Integrating with iPhone Services
168
When the address shown previously is located in Google Maps, the marker is generically labeled 1000
Massachusetts Ave Boston MA .
Pages:
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199