If I have 100 markers on map and I want to do something with only 15 of them is there any way to implement this by using CTRL + click on marker or standard cursor drag selection?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ctrl+click is possible. Add a click event to the marker, and then in the event handler test if the CTRL key was pressed. If so, add the marker to an array that you can then do something with later.
There are some issues documented using this approach, but it has worked for me every time. Just make sure to test in multiple browsers.
See this Stack Overflow question for a drag-box-to-select-markers implementation.