Stylize editable square "balls"

0

When you draw an editable square on the map, those "polka dots" appear in the corners, which are the clickable areas to resize the square.

function initMap() {

      var map = new google.maps.Map(document.getElementById('map'), {
        zoom: 10,
        center: {lat: 44.5452, lng: -78.5389},
        mapTypeId: google.maps.MapTypeId.TERRAIN
      });

    // [START region_rectangle]
      var bounds = {
        north: 44.599,
        south: 44.490,
        east: -78.443,
        west: -78.649
      };

      // Define a rectangle and set its editable property to true.
      var rectangle = new google.maps.Rectangle({
        bounds: bounds,
        editable: true
      });
    // [END region_rectangle]
      rectangle.setMap(map);
}
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
#map {
  height: 100%;
}
<div id="map"></div>

<script async defer src="https://maps.googleapis.com/maps/api/js?callback=initMap"></script>

Canyoustylethose"polka dots"?

    
asked by anonymous 07.10.2015 / 16:56

1 answer

1

Dude. I know you can style the rectangle area itself:

var bounds = {
    strokeColor: '#FF0000',
    strokeOpacity: 0.8,
    strokeWeight: 2,
    fillColor: '#FF0000',
    fillOpacity: 0.35,
    north: 44.599,
    south: 44.490,
    east: -78.443,
    west: -78.649
};

I took a look at the net and found this link that shows the corners in a different way: link

Maybe that will help you. =)

    
07.10.2015 / 22:55