2

Drawing a circle on a map is easy:

https://developers.google.com/maps/documentation/javascript/examples/circle-simple

But if I draw a circle around a point I also want to indicate to the user how big is the radius, is there a way to add text on the circle (for example on the perimeter) that indicate what the radius is?

duncan
  • 31,401
  • 13
  • 78
  • 99
Dan Bolofe
  • 1,099
  • 2
  • 13
  • 21
  • 1
    Possible duplicate of [Google map circle with label](http://stackoverflow.com/questions/36394717/google-map-circle-with-label) – geocodezip Apr 17 '16 at 18:34
  • Possible duplicate of [Add a infobox to the right edge of a circle drawn via Google Maps](http://stackoverflow.com/questions/25412224/add-a-infobox-to-the-right-edge-of-a-circle-drawn-via-google-maps) – geocodezip Apr 17 '16 at 18:46
  • Possible duplicate of [can we place some data inside the circle drawn on the google map using google map api](http://stackoverflow.com/questions/33916264/can-we-place-some-data-inside-the-circle-drawn-on-the-google-map-using-google-ma) – geocodezip Apr 17 '16 at 18:48

1 Answers1

1

The simple way for addit a good stylish text to google maps is use the google maps utilty and in your case yh js-map-label

https://github.com/googlemaps/js-map-label

see this sample page view-source:https://googlemaps.github.io/js-map-label/examples/maplabel.html

    var mapLabel = new MapLabel({
      text: 'Test',
      position: new google.maps.LatLng(34.03, -118.235),
      map: map,
      fontSize: 35,
      align: 'right'
    });
    mapLabel.set('position', new google.maps.LatLng(34.03, -118.235));

    var marker = new google.maps.Marker();
    marker.bindTo('map', mapLabel);
    marker.bindTo('position', mapLabel);
    marker.setDraggable(true);
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107