[OpenLayers-Users] Selecting a feature AND drawing a point

Andrea Maschio andrea.maschio at gmail.com
Mon Feb 4 19:25:35 EST 2008


Hi I was trying to :

1) selecting a feature

2) draw a point where i selected this feature

for 1) i do somewhat like this:

map.events.register('click', map, function (e) {

//build a Pixel using e.xy.x and y

//selection through ajax of my wfs feature

}

now, if i want to add a feature, i must add

	drawPoint.featureAdded = function(feature) {
	//feature is the geometry
}

What i don't understand is how to get from 'feature' the coordinates  
to build the Pixel object. In the documentation I saw there's a  
property, 'lastDown' who returns a pixel, but logging this properties  
I always get 'undefined'.

Anyone could help me?

Thanks

Andrea Maschio
http://www.superandrew.it




More information about the Users mailing list