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

Rob Hyx robhyx at gmail.com
Mon Jul 8 10:11:59 PDT 2013


All,

I am getting an error when trying to add an overview map to my current map.
This is how I am adding the object:

var overviewMap = new OpenLayers.Control.OverviewMap();
map.addControl(overviewMap);

The error:

TypeError: this.baseLayer is null (OpenLayers.debug.js line 9808)
if (this.baseLayer.wrapDateLine) {

I've tried adding a check before the line OL errors on and then adding in
the baseLayer from the layers property, and that works, but I don't want to
be adding in lines of code to OL. Is there something I can pass into the
OverviewMap constructor to fix this?

The actual map renders fine and it does have a baseLayer so I would expect
the overview to just inherit that.

Using OL 2.12 and Firefox 17.0.6

Thanks in advance!

-- 
*HYX*
http://hyx-music.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130708/bf131334/attachment.html>


More information about the Users mailing list