views:

125

answers:

1

I have an application which schedules jobs to engineers. The application uses the Google Maps JavaScript API to display markers showing job locations and the number of jobs at that location – see figure 1. What I’d like to be able to do is draw a box around a collection of markers and display the sum of all jobs.

How would I draw a box around the markers and then get a list of the selected markers? All of the jobs are held in an array with a ‘marker’ property used by Google Maps.

Figure 1:

http://img442.imageshack.us/img442/2198/figure1.jpg

+1  A: 

You can use polygons for drawing a box and having lat/lng values calculate your markers at box area. See more info about polygons here

antyrat
nice suggestion, but the link is in russian :)
Richard
Sorry :) The correct link is http://code.google.com/intl/en/apis/maps/documentation/overlays.html#Polygons_Overview
antyrat