1

I have different types of markers for different scenarios, namely a normal marker representing an item, a custom marker representing several items as a region and a circle marker when too many items are located in the same region to display neatly.

I originally used an infobox for the label of the custom marker, but the labels were illegible when markers overlapped so with help I changed it to a markerwithlabel which solved the problem.

I also use the infobox for the label of the circle marker - but I would only like to use one type of label so I would like to know if the markerwithlabel can be used on a google.maps.circle instead of the infobox?

circleOpts: {
   strokeColor: '#FF0000',
   strokeOpacity: 0.8,
   strokeWeight: 2,
   fillColor: '#FF0000',
   center: someCenterPosition,
   radius: someRegionRadius
};

var circle = new google.maps.Circle(circleOpts);
circle.position = circleOpts.center;
Community
  • 1
  • 1
sim1
  • 457
  • 1
  • 7
  • 26

1 Answers1

1

It's unfortunate that the current google-maps-api-3 doesn't allow for labels to be placed on shapes such as circles and polygons. For now you can use the additional library MapLabel for Google Maps V3

Tah
  • 1,526
  • 14
  • 22