[OpenLayers-Users] Customising vector layer

Arnd Wippermann arnd.wippermann at web.de
Thu Nov 13 12:10:04 EST 2008


I use something like this to simulate the move of a feature to the
clickpoint:

var prevPoint;

function setPoint(vlayer, clickX, clickY, Radius)
{
    ...

    try{
        vlayer.removeFeatures(prevPoint);
    }catch(err){
        alert("error:"+err.message);
    }    

    ...
    
    vlayer.addFeatures([pointFeature]);

    prevPoint = vlayer.features[vlayer.features.length-1];
}

Arnd Wippermann


-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von S.Reena
Gesendet: Donnerstag, 13. November 2008 10:24
An: users at openlayers.org
Betreff: [OpenLayers-Users] Customising vector layer


Hi All,

I have made a vector layer and am using default EditingToolbar(). I now want
that if I make a line then immediately the control should toggle to
navigation so that user cannot click on map more than once at a time.

Also, if I click on map somewhere , it makes a point there ....now I want
that when I click somewhere else ...the previous point should be deleted
from map display...or in other way how to delete some point already drawn on
map..I tried reloading vector layer by passing random parameters ..but its
not doing what I want.

Thanks in Advance :)

Reena.
--
View this message in context:
http://www.nabble.com/Customising-vector-layer-tp20477306p20477306.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

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




More information about the Users mailing list