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 am hoping someone can point me in the right direction. I am not a programmer, so that is my first roadblock. ha

The problem: I have an existing polygon layer and I am trying to select one of the polygons. This has got to be one of the simplest tasks, but I am unable to figure out how to do it. I am trying to follow the methods in the OpenLayers Beginner's Guide, but so far nothing has worked out:

var select_feature_control = new OpenLayers.Control.SelectFeature(
     legal_land_descriptor,
     {
    multiple: false,
    toggle: true,
    multipleKey: 'shiftKey'
     }
);

map.addControl(select_feature_control);
select_feature_control.activate();

Should this not allow me to select a polygon? I did manage to query the polygons by clicking on them, and now I am just trying to select one of the polygons, Argh!

Any ideas as to what I am doing wrong here?

Thanks!!

share|improve this question
    
Can you include the code you are using to create the legal_land_descriptor layer? –  CHenderson Sep 15 '13 at 0:26

1 Answer 1

probably you should try first multiple: hover. One way is that you try http://openlayers.org/dev/examples/select-feature.html, so copy this to your pc and delete what you don't need, just leave the create/select buttons and start testing, that's a very good to start learning both javascript and openlayers. Also, take a look at this

share|improve this answer
    
The link below is dead, please update... –  user3557112 Sep 30 at 18:47

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.