Thursday, June 3, 2010

How do I swap map and street view?

Hello,

I have a GMap2 in a large div and a street map panorama in a much
smaller div. I'm looking to create a button that will call javascript
that will put street view in the larger div and the gmap2 in the
smaller div. I'm using jQuery for most everything else; however, am
open to any ideas. The below puts streetview in the large div but
still sized small and places the map in the small div; however, it's
not 'active' anymore ... no panning or zooming in/out.

Am I way off track?

$( "#btnSwap").click(function() {
var htmlStr = $("#divLowRightContent").html();
var htmlStr2 = $("#map_canvas").html();
$("#map_canvas").html(htmlStr);
$("#divLowRightContent").html(htmlStr2);

return false;
});

Thanks in advance,

JB

--
You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate