javascript - How to get count of Markers within circle radius in Google Maps API v3 -



javascript - How to get count of Markers within circle radius in Google Maps API v3 -

i have google map populate multiple markers, add together addlistener right click event.

on right click, add together temp marker circle radius of 50000 meters,upon dropping marker, count of markers fall within radius.

thanks, should have posted code front, managed resolve on own. per below.

var loc1 = location; //marker radius co-ords var loc2 = new google.maps.latlng(latsplit, lonsplit); //marker co-ords var diff = (google.maps.geometry.spherical.computedistancebetween(loc1, loc2)); if (diff < circle.getradius()) { alert(loc2 + " within radius"); } else { alert(loc2 + " outside radius"); }

javascript jquery google-maps-api-3 google-maps-markers

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -