[OpenLayers-Users] markers feature
jvonrudno
jvonrudno at hotmail.com
Thu Jul 26 02:23:32 PDT 2012
Hi all,
I have created a marker using the function: "feature.createMarker()"
Obviously I have created previously the object "var feature = new
OpenLayers.Feature".
In the "feature" I have added the atribute id as "feature.id =
customerNumber", then I am using the event on mousedown to know when the
user make click in the marker and I create a funtion to handler this event.
In this function I want to get the "feature.id" that I have define.
I need to know this id when the user click over the marker to do other
tasks.
could someone tell me how I can read this feature?
The code is the following:
var feature = new OpenLayers.Feature(layer_markers, lonlat);
feature.id = indexCustomer;
marker = feature.createMarker();
marker.events.register("mousedown", map, mouseMoveHandler);
function mouseMoveHandler(evt) {
alert (marker.id);
}
Many thanks in advance
Jorge
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/markers-feature-tp4990999.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list