[OpenLayers-Users] map.setCenter throws maxExtent has no properties

Ed Fialkowski edfialk at gmail.com
Mon Jun 11 13:06:19 EDT 2007


Hello, I have a comparison app up at
http://niceguy.wustl.edu/NEISGEI/FireComp

I'm using 5 total maps, and I'm only giving movement control to one of them.
So, I have a listener that when the big map is moved, I call setCenter on
the other maps, like this:

function map3moveEndFunc(){
        map1.setCenter(map3.getCenter(), map3.getZoom() - 1);
        map2.setCenter(map3.getCenter(), map3.getZoom() - 1);
        map4.setCenter(map3.getCenter(), map3.getZoom() - 1);
        map5.setCenter(map3.getCenter(), map3.getZoom() - 1);
}

(map3 is by 'big' map, with all the movement).

For some reason, the last 2 calls (map4.setCenter, and map5.setCenter) throw
an error:
Error: maxExtent has no properties
Source File: http://openlayers.org/api/2/OpenLayers.js
Line: 488

Something about map4 and map5 is apparently different, as any calls to
setCenter on these maps throw this error.
I can't seem to find anything that's different though.

Does anybody have any ideas about what might throw this error?

Thanks!
-Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070611/29a3f7c2/attachment.html


More information about the Users mailing list