Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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:

measureControls={
              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

1 Answer 1

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 }
                              );

        map.addControl(selectCtrl);
        selectCtrl.activate();
share|improve this answer
    
hey thanks let me try. –  SriRamaChandra.G Jan 11 '13 at 9:11

Your Answer

 
discard

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.