user1511579
user1511579

Reputation: 1537

wordpress google maps resize

i know this is a problem with so many topics here on stack overflow, i find them during my search, however i guess this one is slightly different.

I' using a plugin on wordpress that allows me on a page using tabs to change content. In an page i have a double tab, which one showing a different google map embed code. As you may already have figured out my problem, when i change tab the center of the map appears on the left top corner.

I found javascript and jquery solutions, but this is a wordpress page, i can't use that there, so, how can i solve this on my wordpress website?

Thank you!

Edit:

    [tab name="X"]

 

<iframe width="100%" height="auto" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.pt/maps?f=q&amp;source=s_q&amp;hl=pt-BR&amp;geocode=&amp;q=40.654471,-7.914153&amp;aq=&amp;sll=41.236676,-8.332331&amp;sspn=0.593802,1.234589&amp;ie=UTF8&amp;ll=40.654471,-7.914153&amp;spn=0.018721,0.038581&amp;t=m&amp;z=14&amp;output=embed"></iframe><br /><small><a href="http://maps.google.pt/maps?f=q&amp;source=embed&amp;hl=pt-BR&amp;geocode=&amp;q=40.654471,-7.914153&amp;aq=&amp;sll=41.236676,-8.332331&amp;sspn=0.593802,1.234589&amp;ie=UTF8&amp;ll=40.654471,-7.914153&amp;spn=0.018721,0.038581&amp;t=m&amp;z=14" target="_blank" style="color:#0000FF;text-align:left">Exibir mapa ampliado</a></small>

[/tab]
[tab name="Y"]

&nbsp;

<iframe width="100%" height="auto" src="http://maps.google.pt/maps?f=q&amp;source=s_q&amp;hl=pt-BR&amp;geocode=&amp;q=40.741339,-7.730044&amp;aq=&amp;sll=40.654483,-7.914145&amp;sspn=0.00936,0.01929&amp;g=40.654483,-7.914145&amp;ie=UTF8&amp;ll=40.741339,-7.730044&amp;spn=0.018696,0.038581&amp;t=m&amp;z=14&amp;output=embed" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<small><a style="color: #0000ff; text-align: left;" href="http://maps.google.pt/maps?f=q&amp;source=embed&amp;hl=pt-BR&amp;geocode=&amp;q=40.741339,-7.730044&amp;aq=&amp;sll=40.654483,-7.914145&amp;sspn=0.00936,0.01929&amp;g=40.654483,-7.914145&amp;ie=UTF8&amp;ll=40.741339,-7.730044&amp;spn=0.018696,0.038581&amp;t=m&amp;z=14" target="_blank">Exibir mapa ampliado</a></small>

[/tab]
[end_tabset]

Upvotes: 0

Views: 657

Answers (1)

Heimindanger
Heimindanger

Reputation: 127

I found javascript and jquery solutions, but this is a wordpress page, i can't use that there

I personally use a plugin called "Inline Javascript Plugin" which allows you to type javascript code directly inside a Wordpress page/post

Upvotes: 1

Related Questions