Bear John
Bear John

Reputation: 3345

change hyperlink formation to iframe?

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&amp;maptype=roadmap\&amp;markers=||<?php echo $location['user_location'] ?>,UK&amp;sensor=false&amp;zoom=8">click</a>

what i have tried:

<iframe src="http://maps.googleapis.com/maps/api/staticmap?size=500x500&amp;maptype=roadmap\&amp;markers=||<?php echo $location['user_location'] ?>,UK&amp;sensor=false&amp;zoom=8"></iframe>

any reason why im just seeing a blank iframe? thanks

Upvotes: 0

Views: 69

Answers (1)

Vilk
Vilk

Reputation: 162

Why you use iframe ? use img

<img src="http://maps.googleapis.com/maps/api/staticmap?size=500x500&amp;maptype=roadmap\&amp;markers=||<?php echo $location['user_location'] ?>,UK&amp;sensor=false&amp;zoom=8">

Upvotes: 1

Related Questions