Skip to content

Instantly share code, notes, and snippets.

@letswritetw
Last active July 26, 2022 02:08
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/1cfe23f63e1e248bd4888b8aed3da6be to your computer and use it in GitHub Desktop.
Save letswritetw/1cfe23f63e1e248bd4888b8aed3da6be to your computer and use it in GitHub Desktop.
leaflet-osm-basic
const customIcon = L.icon({
iconUrl: '圖片的 URL',
iconSize: [42, 42],
});
const marker = L.marker(center, {
icon: customIcon,
title: '跟 <a> 的 title 一樣', // 跟 <a> 的 title 一樣
opacity: 1.0
}).addTo(map);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment