[OpenLayers-Dev] Bug when creation a map in a div with id like 'mapDIV' (2.9RC1)?

bartvde at osgis.nl bartvde at osgis.nl
Tue Apr 6 05:44:12 EDT 2010


Hi,

I am not getting you, can your clarify, ids are case-sensitive.

What does your markup look like (your div definition)?

The div should always be an id (string), not a DOMElement:

     * Parameters:
     * div - {String} Id of an element in your page that will contain the
map.
     *     May be omitted if the <div> option is provided or if you intend
     *     to use <render> later.

Best regards,
Bart

>
> Hi,
> it seems I found a bug or at least a strange behaviour.
> When I create my map with:
> map = new OpenLayers.Map('mapDiv', { ... });
> Everything works as normal but if I use:
> map = new OpenLayers.Map('mapDIV', { ... });
> or
> map = new OpenLayers.Map('map_Div', { ... });
> instead, the map is not initialized. Same happens when using the div
> option
> or when I get the DOMElement first and give it to the map. The OvervieMap
> control instead works great with all versions of writing the element ID. I
> tried to find the problem in trac but couldn't find it.
>
> Greetings Fabian
> --
> View this message in context:
> http://n2.nabble.com/Bug-when-creation-a-map-in-a-div-with-id-like-mapDIV-2-9RC1-tp4857886p4857886.html
> Sent from the OpenLayers Dev mailing list archive at Nabble.com.
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>





More information about the Dev mailing list