PDA

View Full Version : Google Maps and Spry


steve56638
06-09-2009, 10:22 PM
I love the Google Map extension however I would like to use it within a tabbed spry element... on the second panel... however this is were the problems start.

If I display the google map with the initially opened tab it works fine... however if I display the map on the second tab... the marker is not centered and is actually off the map... how can I show a Google map on the second tab of a spry element...

I also need to make sure the info window remains visable once the icon is clicked...

Help... and thanks

Steve

Ray Borduin
06-10-2009, 06:28 AM
This isn't directly supported, but I imagine you could write client side javascript code to readjust the info window and center of the map associated with the spry tab change.

If you provide a url I can take a look and see if I can be more specific.

Martin
06-11-2009, 06:27 PM
Hi Ray,

I am also having this issue with my Map centering of the page.

http://www.thecolonydentist.com/contact.php#1_3. - the Google Map Tab

I am also using a tab panel script as well.

If you go to the top of the page, you will see another map link, but it work perfectly.

I have not a clue what script needs to be written to ensure it centers.

thanks for any help!

Martin

nathan125991
06-17-2009, 01:09 PM
I have read from various sources that the Google Map API and spry are incompatible. The only way I know how to work around this is to place your element in an iframe. The solution is quite ugly, but it's the only known workaround.

Use jquery and Googlemaps. It took me 8 hours of debugging, research, and tears the last time I had to do something like what you're describing.

Cologne
06-17-2009, 01:56 PM
Isnt it possible, to say, the TAB where the map is is default. and with an onload you do a virtual click on the first TAB.

so the tab with the google map is default, centers right, and wit the onload you switch directly to an other tab.

does that work?

Cologne
06-19-2009, 10:19 AM
this is nearly nice, but not right centered :-)


<script type="text/javascript" src="google_javascript/wagmp_maps.js">/*wagmp*/</script>
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab:1});
window.onload = function(){ TabbedPanels1.showPanel(0); };
//-->
</script>


someone from the google forum toold, that I have to insert a new size in the webassist created php file.


var map = new GMap2(document.getElementById('wagmp_map_1'),{size :new GSize(300,300)});


but it is not really centered :-(

Cologne
07-03-2009, 11:04 PM
Hi,

can someone tell me how to use the Map in spry if its not default?

Please,
Denis