jordi fita mas
8d49857dae
I can not use <a> in that map because Leaflet handles the mouse over before the anchors sees it, thus it is impossible to click on them; i have to use a Leaflet layer. Fortunately, i can just use the <path>’s coordinates as the polygon points, because with CRS.Simple the coordinates map to pixel, except for the reversed Y/latitude coordinate. Unfortunately, <path> coordinates are not straightforward to get: I have to follow the drawing coordinates, taking into account the current transformation (CTM), and keeping the last point around for relative coordinates. Bézier curves are simplified to a straight line from start to end. There is one single accommodation that started with a relative move command (m), which apparently have to be treated as an absolute move (M), but subsequent pairs are treated as relative coordinates[0]. It was easier for me to convert that relative move to absolute and add a relative lineto command (l) to the next pair. For now, all i do is highlight the accommodation and zoom it on click, because i do not know how i should the accommodation’s information. [0]: https://www.w3.org/TR/SVG11/paths.html#PathDataMovetoCommands |
||
---|---|---|
.. | ||
camping-association | ||
ckeditor5@40.2.0 | ||
fonts | ||
leaflet@1.9.4 | ||
alpinejs@3.13.3.min.js | ||
camper.css | ||
camper.js | ||
default_avatar.svg | ||
favicon.ico | ||
htmx@1.9.3.min.js | ||
icons.css | ||
jquery@3.7.1.min.js | ||
map.js | ||
public.css | ||
slick@1.8.1.css | ||
slick@1.8.1.min.js | ||
sortable@1.15.1.min.js |