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

Moser Adrian Adrian.Moser at bs.ch
Mon Oct 30 06:38:36 EST 2006


Hi Christian,

Thanks for your reply.

It still doesn't work.
Could it be that Openlayers can't access the map container, because I load it with ajax?
When I the map is be displayed I just load this part of the website and add it to the site with javascript.

Regards,
Adrian

-----Ursprüngliche Nachricht-----
Von: Christian López Espínola [mailto:penyaskito at gmail.com] 
Gesendet: Montag, 30. Oktober 2006 12:25
An: Moser Adrian
Cc: users at openlayers.org
Betreff: Re: [OpenLayers-Users] Openlayers.map is not a construcor


On 10/30/06, Moser Adrian <Adrian.Moser at bs.ch> wrote:
> Hi,
>
> 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

Try with

map = new OpenLayers.Map('map', {controls: []});

(Be careful with the lower and uppercase)

> 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.
>
> Can anyone help me to sove this problem?
>
> Thanks,
> Adrian
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org http://openlayers.org/mailman/listinfo/users
>


-- 
Christian López Espínola


More information about the Users mailing list