[OpenLayers-Users] newbie map constructor issue

Christopher Schmidt crschmidt at metacarta.com
Tue Jun 9 11:32:24 EDT 2009


On Tue, Jun 09, 2009 at 11:15:41AM -0400, Nicholas Efremov-Kendall wrote:
> Hello All,
> 
> I apologize for the probably over-simplistic question but here goes. I'm
> trying to load the map into a div class called map, rather than it's own
> div. In my CSS it should be .map within the parent div. What ends up
> happening is I get the following firebug error

"This ain't jQuery."

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.

 --
 http://dev.openlayers.org/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.OpenLayers.Map


Since your element doens't have an id, you'll need to pass the DOM
element, either as the first arg, or the 'div' option to the map.

-- Chris

> element is null
> removeClass()(null, "olMap")openlayers.js (line 252)
> removeClass()(null, "olMap")openlayers.js (line 252)
> callback()(".map", Object maxResolution=auto)openlayers.js (line 662)
> Class()()openlayers.js (line 116)
> init()jerbamap.js (line 14)
> onload(load )
> 
> I'm new to all of this stuff so I'm not sure where the issue is, or even
> where to begin to resolve it, but I'm pretty sure it's in the map
> constructor. Any suggestions.
> 
> here's my map constructor
> map = new OpenLayers.Map('.map', options);
> 
> and my map is within
> <div id="content">
> <div class="map">
> </div></div>

> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users


-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list