Welcome to my blog, Whats this about then?

This is a place where I will be posting all sorts of things not just things relating to Derby and Derbyshire. On here you will find details of any videos I’ve made of things in Derby and also Time-lapse, stop motion animation, Tutorials etc. If I find some useful software for PC or iPhone then I will feature it here.I’m sure that there will be something of interest to someone on my many posts.Please leave comments on any posts if you like them.
Don’t forget if you are new to my blog and would like to read through the previous posts then see the Blog Archive section on the left side of this page.
Also there is a Search box at the top left of the page if you are looking for something but cant remember where it was. I am a trustee member of "Friends of Friar Gate bridge", aiming to get this bridge restored.

Friday, 6 August 2010

How to make a Drop Pin show on iPhone Maps via a web page link.

Something which I find annoying on the iPhone is when viewing an embeded custom google map in Safari, if you click on the link below the embeded map it launches the Maps application and loses all of the markings and pointers that were on the embeded map.

I have found a way to create a link on a web page that when veiwed in Safari on your iPhone it will launch the Maps application and put a drop pin onto the map which you can then use to get directions to or view streetview on your iPhone.

To see this in action you need to be veiwing this blog post on your iPhone. I imagine this will also work on an iPad, perhaps someone can let me know if thats the case.

Drop pin on iPhone Maps via html example.
Click the link below and it will close Safari and open up the Maps app and show a drop pin on it.


Hopefully you should have seen that the Maps App was launched and a red Drop Pin was placed in the middle of the River Derwent.
If you want the html code for this simply click the link on a computer (rather than on an iPhone)

If you are wondering how on earth to find precise Lat/Long coordinates for your drop pins then I suggest using the Google API Polyline Encoder tool, its not really designed for this purpose but I often use this tool because its very quick, easy to use and very accurate.

Goto the Utility here:
Interactive Polyline Encoder Utility

How to use the tool to find Latitude and Longitude positions.
1) First type in a place you want to find in the field marked "Center map at:", this will get you a map of the area. You don't need to be really accurate at this stage.

2) Click the Hybrid button for high accuracy positioning of your pointer.
3) Drag the map view around to get it so you can see what you want to see, Zoom in to help accuare placement.
4) Click on the map where you want a mark placing. As soon as you click you will notice that a green marker will appear on the map and the Latitude and Longitude fields show accurate position data.
5) You can move the green marker around by simpy clicking on it and dragging it to where you want it. the Latitude and Longitude data will update as you move it around.
Its as simple as that, you are in full control of the marker.

This post may be of use to some people wanting to create web content that will work on an iPhone map.
If you found this of use then please leave a comment.
The next thing I need to see how much more you can do with the iPhone Maps application.


No comments:

Post a Comment