[OpenLayers-Users] Openlayers.map is not a construcor

Christopher Schmidt crschmidt at metacarta.com
Mon Oct 30 09:19:43 EST 2006


On Mon, Oct 30, 2006 at 03:00:24PM +0100, Moser Adrian wrote:
> I tried the single file version of Openlayers and the error I got before didn't occour. Instead I got the follwing error: maxExtent has no properties. I tried to set the maxExtent but it didn't work:
> 
> map = new OpenLayers.Map('map', { projection: 21781, maxExtent: new OpenLayers.Bounds(606800,262500,619100,272400) });

'maxExtent has no properties' is usually an error masking the fact that
you don't have a base layer set on your map. Are you using all overlays, and 
no base layer? (If you look at the layerswitcher control, added via
map.addControl(new OpenLayers.Control.LayerSwitcher()), base layers are
radio buttons, and overlays are checkboxes.)

> I still can't understand why it doesn't work with the other version. I load the OpenLayers.js file when the website is loaded. On this site I got a link which onclick loads the map container (div) asynchronously. After that I try initialize the map. The OpenLayers.js should be loaded then.

Again, without an example HTML page to look at, or a publicly visible
link, debugging this situation further is difficult. Without either of
those, I can't offer any advice on why this might be happening. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list