[OpenLayers-Users] Openlayers.map is not a construcor
crschmidt at metacarta.com
Mon Oct 30 07:39:20 EST 2006
On Mon, Oct 30, 2006 at 12:15:44PM +0100, Moser Adrian wrote:
> I'm trying to use Openlayers for an application I'm developping.
> When I try to initialize the map I get the following error message: Openlayers.map is not a construcor
> I can't figuere out why this error occurs, since it works on a similar example. The only reason that could be is that I'm loading the map container (div) with ajax. So it's not on the website when i first load it but it is there when I try to initialize the map.
I think that the latter part of your statement is probably not true.
That error message indicates that you are attempting to create the
asynchronously. If you're not building a single file, and you're adding
loading the Map object after the Map file is loaded, since the onload
is loaded. To test if this is the case, you can use a single file
version of OpenLayers. One is hosted on OpenLayers.org:
or, to use the latest RC:
If this doesn't work, example HTML which is causing the error would be
helpful in further debugging.
More information about the Users