Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two points which are marked dynamically on the map and when I mark the start point it is returning lon,lat, but I want to assign this coordinates to the variable that marked/handled the start symbol and a point. Ex:

              start: new OpenLayers.Control.DrawFeature(start, OpenLayers.Handler.Point),
              stop: new OpenLayers.Control.DrawFeature(stop, OpenLayers.Handler.Point),

for the same start and stop, I would like to add event 'click' and assign the point when clicked.

Thank you

share|improve this question
Please clarify more your question. I could not understand what you want. Your sample could looks like truncated. – cavila Jan 4 '13 at 12:19

Hey i think u talking about click event feature enter code here

    function onFeatureSelect(evt) {


        var selectCtrl = new OpenLayers.Control.SelectFeature(yourlayername,
            clickout: true, onSelect:onFeatureSelect }

share|improve this answer
hey thanks let me try. – SriRamaChandra.G Jan 11 '13 at 9:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.