Skip to content

Instantly share code, notes, and snippets.

@letswritetw
Created June 10, 2019 03:58
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/8ec66712ed0e864fef975f0827bc9bfd to your computer and use it in GitHub Desktop.
Save letswritetw/8ec66712ed0e864fef975f0827bc9bfd to your computer and use it in GitHub Desktop.
google-map-api
let simplePolyline = [
{ lat: 35.7044724, lng: 139.6916473 },
{ lat: 35.7114772, lng: 139.715292 },
/* ... */
];
let polyline = new google.maps.Polyline({
path: simplePolyline,
geodesic: true,
strokeColor: '#FF0000', // 折線顏色
strokeOpacity: 1.0, // 折線透明度
strokeWeight: 5 // 折線粗度
});
polyline.setMap(map);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment