I have DrawFeature controls defined like so:
BB.drawingControls = {
point:new OpenLayers.Control.DrawFeature(
BB.StandardOverlays.annotations,
OpenLayers.Handler.Point,
{ featureAdded : fAdded }),
path: new OpenLayers.Control.DrawFeature(
BB.StandardOverlays.annotations,
OpenLayers.Handler.Path,
{ featureAdded : fAdded }),
polygon: new OpenLayers.Control.DrawFeature(
BB.StandardOverlays.annotations,
OpenLayers.Handler.Polygon,
{ featureAdded : fAdded }),
area: new OpenLayers.Control.Measure(
OpenLayers.Handler.Polygon,
{persist: true}),
distance:new OpenLayers.Control.Measure(
OpenLayers.Handler.Path,
{persist:true})
}
These are initialized at the beginning of the application, and they work fine
so long as I don't add any other layers. Additionally, I take the precaution
of setting the layer index for BB.StandardOverlays.annotations to 100, because
I want them always on top, and I know ahead of time how many possible overlays
there can be:
BB.map.setLayerIndex(BB.StandardOverlays.annotations, 100);
Now, the annotations layer always appears to be on top like it should be, but
after a user adds a new overlay, they cannot use the drawing controls on the
annotation layer anymore. It's like they just disappeared. I call "activate"
on the control when the user selects it, so that's not the problem. I've tried
event handlers to see if the control's even being called, but it's not.
Is there something I should be doing after adding a layer to make sure drawing
controls still work?
-- Jeff
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users