From a8c7b2328ed5480e6682d6d0ae9ef1c0d0a9238a Mon Sep 17 00:00:00 2001 From: Atomjoy Date: Thu, 13 Jun 2024 20:48:22 +0200 Subject: [PATCH] Map marker example Openlayers Map marker example. --- demo/ol-map.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/ol-map.js b/demo/ol-map.js index 3e6585f..1bd98aa 100644 --- a/demo/ol-map.js +++ b/demo/ol-map.js @@ -12,7 +12,7 @@ var Lat = Point[1]; var Map = CreateMap(Point); // Create markers -CreateMarker(Lon, Lat, 'Cool marker', PopupHtml(Lon, Lat), '/marker.png'); +CreateMarker(Lon, Lat, 'Cool marker', PopupHtml(Lon, Lat), 'marker.png'); // Show popup on click ShowPopup(); @@ -56,7 +56,7 @@ function PopupHtml(lon, lat) return '
Latitude: ' + lat + ' Longitude: ' + lon; } -function CreateMarker(lon, lat, popup_title, popup_html, marker_image = '/img/marker-64.png', marker_scale = 1) +function CreateMarker(lon, lat, popup_title, popup_html, marker_image = 'marker.png', marker_scale = 0.5) { var Icon = new ol.Feature({ geometry: new ol.geom.Point(ol.proj.fromLonLat([lon,lat])),