feat: complete Tier 4 marker/popup options, events, and live drag (#16)
All checks were successful
CI / Build and Test (push) Successful in 37s

This commit was merged in pull request #16.
This commit is contained in:
2026-02-21 00:38:28 +00:00
parent 15fda48844
commit 453618f712
4 changed files with 246 additions and 21 deletions

View File

@@ -158,15 +158,21 @@ func main() {
m.AddMarker("sf", maplibre.Marker{
LngLat: maplibre.LngLat{Lng: -122.4194, Lat: 37.7749},
Color: "#e74c3c",
Scale: 1.3,
Popup: &maplibre.Popup{
Content: "<strong>San Francisco</strong><p>The Golden City</p>",
},
})
noCloseOnClick := false
m.AddMarker("oak", maplibre.Marker{
LngLat: maplibre.LngLat{Lng: -122.2711, Lat: 37.8044},
Color: "#2ecc71",
LngLat: maplibre.LngLat{Lng: -122.2711, Lat: 37.8044},
Color: "#2ecc71",
Opacity: 0.7,
Popup: &maplibre.Popup{
Content: "<strong>Oakland</strong>",
Content: "<strong>Oakland</strong>",
Anchor: "bottom",
Offset: [2]float64{0, -10},
CloseOnClick: &noCloseOnClick,
},
})