VinceGledhill Posted August 31, 2011 Share Posted August 31, 2011 Hi People. I run the following airfield site http://www.microlight.co Now on each airfield card there is a google iframe image that is held in the database and shows OK on the page. Anyone got any idea how I can get a hold of the co-ordinate information for each card so that I can display it somewhere else on screen? Here is a typical image of the airfield I use. <iframe width="700" height="700" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.co.uk/maps?ie=UTF8&t=h&ll=53.952058,-1.17631&spn=0.008839,0.014999&z=16&output=embed"></iframe><br /><small><a href="http://www.google.co.uk/maps?ie=UTF8&t=h&ll=53.952058,-1.17631&spn=0.008839,0.014999&z=16&source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small> Link to comment https://forums.phpfreaks.com/topic/246105-any-idea-how-to-get-the-co-ordinates-data-out-of-a-google-map-iframe-picture/ Share on other sites More sharing options...
silkfire Posted August 31, 2011 Share Posted August 31, 2011 The coordinates are in the link and pretty visible: http://maps.google.com/?ie=UTF8&t=h&ll=52.738916,-0.031264&z=16&source=embed Do you want to know how to extract it? preg_match('#&ll=([^&]+)#', $map_address, $coordinates); echo $coordinates[1]; How to convert to this format I don't know actually: 12° 20.736′ N, 98° 45.924′ W. Link to comment https://forums.phpfreaks.com/topic/246105-any-idea-how-to-get-the-co-ordinates-data-out-of-a-google-map-iframe-picture/#findComment-1263908 Share on other sites More sharing options...
VinceGledhill Posted August 31, 2011 Author Share Posted August 31, 2011 Thanks for that, I'll test it out. Link to comment https://forums.phpfreaks.com/topic/246105-any-idea-how-to-get-the-co-ordinates-data-out-of-a-google-map-iframe-picture/#findComment-1263940 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.