AW: [OpenLayers-Users] modify attribut of marker
razibu
backenklatscher at yahoo.de
Sat May 21 08:30:49 EDT 2011
The page u linked too is not really working. If you choose "edit all" and
then press refresh, all symbols disappear.
I tried the function you mentioned but the return just give "undefined"
That is the editing function
function EditMarker() {
if (selectedFeature != "None") {
var tempname = getName(selectedFeature);
layer.removeFeatures(layer.selectedFeatures);
var features = [];
var myMarker = new OpenLayers.Feature.Vector(new
OpenLayers.Geometry.Point(selectedFeature.geometry.getBounds().getCenterLonLat().lon,
selectedFeature.geometry.getBounds().getCenterLonLat().lat));
var MarkerLabel = tempname;
var MarkerStatus = document.getElementById("mstatus").value;
var MarkerIcon = document.getElementById("Icon").value;
myMarker.attributes = {
name: tempname,
mstatus: MarkerStatus,
icon: "../openlayers/img/fahrzeuge/" + MarkerIcon +
".png",
radius: 10
};
features.push(myMarker);
layer.addFeatures(features);
}
}
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/modify-attribut-of-marker-tp6389089p6389329.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list