markpirvine
markpirvine

Reputation: 1592

Google Map Marker Selection

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

Upvotes: 2

Views: 2010

Answers (2)

CrazyTim
CrazyTim

Reputation: 7314

Try fiddling with the example here.

Upvotes: 0

antyrat
antyrat

Reputation: 27765

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

Upvotes: 1

Related Questions