[OpenLayers-Users] panel does not appear
Didrik Pinte
lists at dipole-consulting.com
Wed Jan 14 06:00:22 EST 2009
Hi,
I'm trying to add a panel to my map.
I have followed the example given here :
http://workshops.opengeo.org/openlayers/intro/doc/en/controls.html
But nothing shows on the map.
The code is the following :
---------------------------------------------------------
map.addLayer(vector_layer);
var mypanel = new OpenLayers.Control.Panel({
//div: document.getElementById("panel"),
//displayClass: "mypanel"
});
var drawctrl = new OpenLayers.Control.DrawFeature(vector_layer,
OpenLayers.Handler.Polygon);
var modctrl = new OpenLayers.Control.ModifyFeature(vector_layer);
var hist = new OpenLayers.Control.NavigationHistory();
map.addControl(hist);
map.addControl(drawctrl);
map.addControl(modctrl);
mypanel.addControls([drawctrl, modctrl, hist.next, hist.previous]);
mypanel.activateControl(drawctrl);
map.addControl(mypanel);
map.zoomToMaxExtent();
---------------------------------------------------------
I have tried with a simple EditingToolbar and it appears fine in the
left corner of the map.
What could be wrong ? Firebug lists everything but there is nothing
appearing anywhere.
I am using OpenLayers 2.7.
Thanks in advance for any help.
Didrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090114/2360d4d9/attachment.bin
More information about the Users
mailing list