Skip to content

Instantly share code, notes, and snippets.

@letswritetw
Created June 10, 2019 04:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save letswritetw/6b58f909f0a7e6bf84cc1df914816858 to your computer and use it in GitHub Desktop.
Save letswritetw/6b58f909f0a7e6bf84cc1df914816858 to your computer and use it in GitHub Desktop.
google-map-api
let simplePolygon = [
{ lat: 35.7044724, lng: 139.6916473 },
{ lat: 35.7114772, lng: 139.715292 },
/* ... */
];
let bermudaTriangle = new google.maps.Polygon({
path: simplePolygon,
strokeColor: '#f1c40f', // 線條顏色
strokeOpacity: 0.8, // 線條透明度
strokeWeight: 5, // 線條粗度
fillColor: '#f1c40f', // 多邊形裡填滿的顏色
fillOpacity: 0.24 // 多邊形裡,填滿顏色的透明度
});
bermudaTriangle.setMap(map);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment