使用 L.polygon繪畫連接四間酒店的多邊形,四間酒店的名稱及坐標如下: 香港尖沙咀凱悅酒店 : 22.297696623540645, 114.17403305500363 九龍香格里拉 : 22.297349192568806, 114.17705858671009 九龍酒店 : 22.29592967990824, 114.17179072831338 半島酒店 : 22.295344002650047, 114.17183364365674 例子如下: var polygon = L.polygon([[22.297696623540645, 114.17403305500363],[22.297349192568806, 114.17705858671009],[22.29592967990824, 114.17179072831338], [22.295344002650047, 114.17183364365674]], {color: 'red',weight:8,fillColor:'blue',fillOpacity:1}).addTo(map); Source code modified from Leaflet.Js Essentials by Paul Crickard III : <html> <head><title>Leaflet.js Essentials</title> <<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" crossorigin="" /> </head> <body> <script src="https://unpkg.com/leaflet@1.7.1/dist/lea...