Tell me more ×
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 need to create filters based on attributes of markers. I have markers defined this way:

var locations = [    
['AB11 5HW','17','A',57.147701,-2.085442 ] ,
['AB11 8DG','3','B',57.129372,-2.090916 ] ,
];

If the user selects for 'A' or 'B' all markers containing attribute A or B should become visible on the map. Something like

var markersA =  a[2] contains 'A' 

I thought it is maybe possible with Leaflet Marker groups or something similar.

I'm new to Javascript so I'm interested if it's even possible.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.