PDA

View Full Version : Problem with google map in article


L2Insomnia
01-09-2012, 06:05 PM
I am making a contact page for my site and trying to add a google map to the article but it only shows a thin strip of the map.

See here http://www.mtlcustomcomputers.com/content/125-contact-us.html

I am using the CODE tags anything else and it comes up blank also HTML is allowed for that article. I could get it to work using a static html page but would rather be able to put it in a article as it is a bit more convenient.

How can i fix it so it shows the whole map?

Thanks
Insomnia

kh99
01-09-2012, 06:43 PM
Hmm...maybe add to the iframe tag style="min-height:480px;"

L2Insomnia
01-09-2012, 06:52 PM
I break it whenever I add that. Where should I put it here is the code I am using

<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=128+a+smith+l asalle+qc&amp; aq=&amp;sll=37.0625,-95.677068&amp;sspn=50.823846,105.556641&amp;vpsrc=0&amp;ie=UTF 8&amp;hq=&amp;hnea r=128+Rue+Smith,+LaSalle,+Québec+H8R+3H9,+Canada&amp; t=m&amp;ll=45.43478,-73.643589&amp;spn=0.02891,0.054932&amp;z=14&amp;iwloc=A&amp;output =embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=128+a+smith +lasalle+qc&am p;aq=&amp;sll=37.0625,-95.677068&amp;sspn=50.823846,105.556641&amp;vpsrc=0&amp;ie=UTF 8&amp;hq=&amp;hnea r=128+Rue+Smith,+LaSalle,+Québec+H8R+3H9,+Canada&amp; t=m&amp;ll=45.43478,-73.643589&amp;spn=0.02891,0.054932&amp;z=14&amp;iwloc=A" style="color:#0000FF;text-align:left">View Larger Map</a></small>

kh99
01-09-2012, 06:58 PM
Well, that was a guess - it could be that an iframe can't have a style. Anyway, I made a bbcode with the code you posted and it worked in a post (but I know that doesn't help you). Sorry - maybe someone else will know.

L2Insomnia
01-09-2012, 07:01 PM
What was the bbcode to make it work in a post? As far as I have seen anything that works in a forum post will work in a article.

kh99
01-09-2012, 07:03 PM
I just made a 'map' bbcode and put your code, unchanged, in the replacement text area. I had to click the "No" for "Remove if Empty", but other than that i used the default settings. Then in my post I put .

But I also went back and tried the style thing, and that also worked - so you *can* have a style in an iframe tag, and setting the min-height seems to work. So to answer your previous question, it would go something like this:

<iframe style="min-height:480px;" width="640" height="480" ....etc.


Edit: Unfortunately, I see that it didn't work...maybe try taking it out of the CODE tag?

L2Insomnia
01-09-2012, 08:44 PM
Yep needed to take it out of the CODE tags. Thanks!