[OpenLayers-Users] Error when adding OpenLayers.Control.OverviewMap

Alexandre Dubé adube at mapgears.com
Wed Jul 10 05:17:19 PDT 2013


Hi Robert,

   You could try to create your overview map with its own layers:

   new OpenLayers.Control.OverviewMap({
     layers: [
       new OpenLayers.Layer...
     ]
   });

HTH,

Alexandre


On 13-07-10 07:34 AM, Rob Hyx wrote:
> Alexandre, thanks for your reply.
>
> I did try adding the control in via Firebug just from the console 
> after the page has fully loaded and I get the same error. From looking 
> at the call stack in FB:
>
> zoomToExtent(bounds=-180,-90,180,90 { left=-180, bottom=-90, 
> right=180, more...}, closest=undefined)
> zoomToMaxExtent(options=undefined)
> createMap()
> update()
> draw()
> addControlToMap(control=Object { layers=[1], handlers={...}, 
> displayClass="olControlOverviewMap", more...}, px=undefined)
> addControl(control=Object { layers=[1], handlers={...}, 
> displayClass="olControlOverviewMap", more...}, px=undefined)
>
> So it's the call to zoomToMaxExtent() in createMap() that does it. I 
> can see in draw() that there are layers being assigned to the overview 
> (the baseLayer of the the actual map object), but no baseLayer property.


-- 
Alexandre Dubé
Mapgears
www.mapgears.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130710/a7a101bf/attachment.html>


More information about the Users mailing list