I've a page with multiple (2) GMap2 objects. Each is in a full screen
DIV. These DIVs are displayed ( display:block ) or hidden
(display:none) in response to user interaction. When I create the
maps with
this.map = new GMap2
( e ); // create the map
this.map.addMapType( G_PHYSICAL_MAP );
this.map.addControl(new GOverviewMapControl( new GSize
( 140, 140 )));
var ll = new GLatLng( lat, lon );
this.map.setCenter( ll, zoom, G_PHYSICAL_MAP);
this.map.addControl(new GLargeMapControl());
this.map.addControl(new GMapTypeControl());
this.map.addControl(new GScaleControl(), new
GControlPosition( G_ANCHOR_BOTTOM_RIGHT, new GSize( 30, 130 )));
this.map.addControl( GW.overview );
this.map.enableGoogleBar();
this.map.enableScrollWheelZoom();
as part of a Javascript class. The map DIV IS displayed briefly
during map creation.
Firebug shows the following error:
this.show is not a function
Lv()main.js (line 1402)
map()()gwxxx.js (line 531)
init()()gwxxx.js (line 70)
onLoad()()gwxxx.js (line 41)
onload(load )mod_over...ontrol.js (line 1)
[Break on this error] Kp.f=P;Gk
(Kp,Kv);Kp.prototype.op=P;Kp.pr...arguments);this.show();this.Gp
(this.bf)}
If I create the maps WITHOUT the GOverviewMapControl all is well.
Several questions:
Is this a bug? Is it driven by timing issues? Is there a workaround?
In a related matter, can a single control instance be on MULTIPLE
maps, ie.
var omc = new GOverviewMapControl( new GSize( 140, 140 ));
map1.addControl( omc );
map2.addControl( omc );
Likewise, can an instance of a geo feature (GMarker, GPolyLine,
GPolygon) be on multipel maps, ie.
var line = new GPolyline( points, feature.color,
feature.width, GW.POLY_OPACITY );
map1.addOverlay( line );
map2.addOverlay( line );
Thanks for any help.
Puff
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---