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

ibarkley ian.barkley at CATLINUSA.COM
Tue Feb 5 08:17:06 EST 2008


In the feature class there exists a 'geometry' class that contains a
LineString: pretty much [x1,y1,x2,y2,],[]..]; the start,end for each vertex
on the feature. these coordinates are in whatever coordinate system the base
layer is in, but you can use the map object and 'getViewPortPxFromLonLat()'
or something similar to construct a Pixel object....
-Ian

superandrew wrote:
> 
> 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
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 
> -----
> --
> 
> http://www.superandrew.it
> 

-- 
View this message in context: http://www.nabble.com/Selecting-a-feature-AND-drawing-a-point-tp15281046p15289908.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list