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
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
