RPeraltaJr
5/1/2017 - 2:18 PM

Google Maps with Polygon Fill Shape. Create Styles: https://mapstyle.withgoogle.com/ Create Polygon Path: http://gmapgis.com/

Google Maps with Polygon Fill Shape. Create Styles: https://mapstyle.withgoogle.com/ Create Polygon Path: http://gmapgis.com/

function initMap() {

  // Styles (created @ https://mapstyle.withgoogle.com/)
  tmcMapStyles = [{
   // map styles ...
   // ...
  }]
 
  // TMC Map
  var tmcMap = new google.maps.Map(document.getElementById('map'), {
    scrollwheel: false,
    zoom: 4,
    center: {lat: 23.9685988, lng: -93.90181310000003},
    styles: tmcMapStyles
  });
  
  // Define the LatLng coordinates for the polygon's path.
  // Use http://gmapgis.com/ for coordinates. (Also checkout http://www.birdtheme.org/useful/v3tool.html)
  var tmcCoords = [
    {lat: 29.993, lng: -90.17578},
    {lat: 29.49699, lng: -91.4502},
    {lat: 29.8597, lng: -91.88965},
    ....
    ...
  ];
  
  // Construct the polygon.
  var tmcPolygon = new google.maps.Polygon({
    paths: tmcCoords,
    strokeColor: '#C1A541',
    strokeOpacity: 0.8,
    strokeWeight: 2,
    fillColor: '#CFAE00',
    fillOpacity: 0.75
  });
  tmcPolygon.setMap(tmcMap);

}