Hi,

I have a slightly odd error with point vector features on my site Freemap, 
www.free-map.org.uk. Point vector features are loaded from a GeoRSS feed with a 
BBOX strategy and overlaid on the map; when you click on a feature, a 
description appears in a popup. It works fine until a user adds a new feature. 
If you login (test account username test1/password test1) and select "Annotate" 
and click on the map, you can add a new annotation feature to the map. It's 
added successfully, *but* then the ability to click on features is lost.

The SelectFeature is instantiated as follows:

 var selF = new OpenLayers.Control.SelectFeature
        (freemap.layerAnnotations,
            { onSelect: freemap.annotationSelect.bind(freemap) }  
        );
The code to add a new feature is as follows;

var annotationFeature=new OpenLayers.Feature.Vector();
annotationFeature.geometry = pt;
annotationFeature.text = xmlHTTP.request.options.aText;
this.layerAnnotations.addFeatures(annotationFeature);
The full JS code is at http://www.free-map.org.uk/freemap/js/main.js.

Can anyone see what the problem with my code is here? I also respond to clicks 
on the actual map, maybe it's something to do with that? i.e.

 freemap.map.events.register("click",freemap,freemap.clickHandler);


Thanks,
Nick


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to