[OpenLayers-Trac] Re: [OpenLayers] #3578: Need a way to get the coordinates of the click on vector features/layers

OpenLayers trac-20090302 at openlayers.org
Wed Nov 16 17:38:52 EST 2011


#3578: Need a way to get the coordinates of the click on vector features/layers
------------------------------------+---------------------------------------
  Reporter:  vishcious              |       Owner:  tschaub     
      Type:  feature                |      Status:  closed      
  Priority:  minor                  |   Milestone:  2.12 Release
 Component:  Control.SelectFeature  |     Version:  2.11        
Resolution:  invalid                |    Keywords:              
     State:                         |  
------------------------------------+---------------------------------------

Comment(by jorix):

 Replying to [comment:2 vishcious]:
 > Interesting... how would I go about using it? Specifically with the
 SelectFeature control. Will this enable the selectFeature control's event
 to arrive with the xy of the click also along with the feature?

 Usually is used this to get the point:
 {{{feature.geometry.getBounds().getCenterLonLat()}}}

 It is a point on the map, not a pixel, which is not the same. Is used in
 most situations to show popups or others...

 What is your concern?

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3578#comment:3>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list