Skip to content

Commit

Permalink
Map marker example
Browse files Browse the repository at this point in the history
Openlayers Map marker example.
  • Loading branch information
atomjoy authored Jun 13, 2024
1 parent 59c8884 commit a8c7b23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/ol-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -56,7 +56,7 @@ function PopupHtml(lon, lat)
return '<label>Details</label> <br> 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])),
Expand Down

0 comments on commit a8c7b23

Please sign in to comment.