Reputation: 3345
hi i have a link that shows a google map and echoe's the users location on the map, at the moment this works by the user clicking the link and the map opening in a new window.
what i want to try and do though is make this into an iframe, so there is no need to click a hyperlink, and instead the map and the users location is being echoed in the iframe. is this possible?
here's my link:
<a href="http://maps.googleapis.com/maps/api/staticmap?size=500x500&maptype=roadmap\&markers=||<?php echo $location['user_location'] ?>,UK&sensor=false&zoom=8">click</a>
what i have tried:
<iframe src="http://maps.googleapis.com/maps/api/staticmap?size=500x500&maptype=roadmap\&markers=||<?php echo $location['user_location'] ?>,UK&sensor=false&zoom=8"></iframe>
any reason why im just seeing a blank iframe? thanks
Upvotes: 0
Views: 69
Reputation: 162
Why you use iframe ? use img
<img src="http://maps.googleapis.com/maps/api/staticmap?size=500x500&maptype=roadmap\&markers=||<?php echo $location['user_location'] ?>,UK&sensor=false&zoom=8">
Upvotes: 1