diff --git a/proj/map/.index.html.swp b/proj/map/.index.html.swp deleted file mode 100644 index 85e53fb..0000000 Binary files a/proj/map/.index.html.swp and /dev/null differ diff --git a/proj/map/asset/css/style.css b/proj/map/asset/css/style.css index e790cc6..cfdda74 100644 --- a/proj/map/asset/css/style.css +++ b/proj/map/asset/css/style.css @@ -234,3 +234,23 @@ nav.cardnav span.marker { bottom: -20px; transition: 0.5s; } +/**Leaflet overwrite**/ + +div.leaflet-popup-tip { + background-color: var(--b9h-color-fg); +} + +.leaflet-container div.leaflet-popup-content-wrapper { + border-radius: 0px; + color: var(--b9h-color-bg); + background-color: var(--b9h-color-fg); + font-family: Inter; + font-weight: 400; + font-size: 1rem; + text-align: center; + padding-top: 5px; +} + +.leaflet-container a.leaflet-popup-close-button { + color: var(--b9h-color-bg); +} diff --git a/proj/map/asset/js/map.js b/proj/map/asset/js/map.js index c8d1c8e..eca001e 100644 --- a/proj/map/asset/js/map.js +++ b/proj/map/asset/js/map.js @@ -1,4 +1,5 @@ console.log("hello from map.js") +var hotelxy=[-19.8,47.5] var maxZoomLevel = 6 var tileSize = 256 @@ -8,7 +9,7 @@ var maxLenght = Math.pow(2, maxZoomLevel) * tileSize var mapNE = [maxLenght, 0] var mapSW = [0, maxLenght] -var map = L.map('map', {'attributionControl': false}).setView([0,0],1); +var map = L.map('map', {'attributionControl': false}).setView(hotelxy,1); L.tileLayer('asset/tiles/{z}/{x}/{y}.png', { minZoom: 1, @@ -30,12 +31,21 @@ console.log(map.getMaxZoom()) var markPointerIcon = L.icon({ iconUrl: 'asset/markers/pointer.png', iconSize: [22, 32], - iconAnchor: [7, 20], - popupAnchor: [-10, -34], + iconAnchor: [11, 32], + popupAnchor: [0, -38], }); -var marker = L.marker([0,0], {icon: markPointerIcon}).addTo(map); +var marker = L.marker(hotelxy, { + icon: markPointerIcon, + draggable : true, +}).addTo(map); + +marker.bindPopup("check"); + +marker.on('click', function(e) { + console.log("hello from marker") +}) /* min/max = 163 diff --git a/proj/map/asset/markers/markers.svg b/proj/map/asset/markers/markers.svg index daa3c38..63cbe88 100644 --- a/proj/map/asset/markers/markers.svg +++ b/proj/map/asset/markers/markers.svg @@ -23,9 +23,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="0.31873766" - inkscape:cx="-837.35074" - inkscape:cy="-1835.454" + inkscape:zoom="0.65301815" + inkscape:cx="1526.5028" + inkscape:cy="-3721.8606" inkscape:document-units="mm" inkscape:current-layer="layer1" inkscape:document-rotation="0" @@ -41,7 +41,7 @@ inkscape:snap-midpoints="true" showguides="true" inkscape:guide-bbox="true" - inkscape:snap-global="true" + inkscape:snap-global="false" inkscape:window-width="1280" inkscape:window-height="779" inkscape:window-x="0" @@ -58,6 +58,14 @@ position="-100.54166,681.96879" orientation="0,-1" id="guide5006" /> + + @@ -67,7 +75,7 @@ image/svg+xml - + @@ -192,13 +200,69 @@ d="m -31.749992,-460.375 c -2e-6,37.99259 -29.65778,75.40621 -68.791668,133.18728 -39.13488,-57.78107 -68.79166,-95.1947 -68.79166,-133.18728 0,-37.99258 30.79908,-68.79166 68.79166,-68.79166 37.992587,0 68.791666,30.79907 68.791668,68.79166 z" sodipodi:nodetypes="scsss" inkscape:export-filename="/home/ed/code/web/html-css/ed.brz9.dev/assets/marker/png/pointer.png" - inkscape:export-xdpi="12.6" - inkscape:export-ydpi="12.6" /> + inkscape:export-xdpi="4" + inkscape:export-ydpi="4" /> + + + + + + + + + + + +