From e492b36eadc65a7f8698ceff872a61a66d840dab Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 30 Mar 2019 01:36:24 -0600 Subject: [PATCH] Add custom map marker icon --- www/img/mapmarker.svg | 2 ++ www/js/map.js | 17 ++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 www/img/mapmarker.svg diff --git a/www/img/mapmarker.svg b/www/img/mapmarker.svg new file mode 100644 index 0000000..1d78bdf --- /dev/null +++ b/www/img/mapmarker.svg @@ -0,0 +1,2 @@ + + diff --git a/www/js/map.js b/www/js/map.js index 0027c78..e1a864e 100644 --- a/www/js/map.js +++ b/www/js/map.js @@ -57,15 +57,14 @@ var leafletpeoplelayer = L.geoJson( } }, pointToLayer: function (feature, latlng) { - return L.marker(latlng); -// return L.circleMarker(latlng, { -// radius: 14, -// fillColor: "#f00", -// color: "#000", -// weight: 1, -// opacity: 1, -// fillOpacity: 0.6 -// }); + return L.marker(latlng, { + icon: L.icon({ + iconUrl: "img/mapmarker.svg", + iconSize: [25, 41], + iconAnchor: [12.5, 40], + popupAnchor: [0, -28] + }) + }); } } );