From 953a50d0a9aa37a7a431b3cbdcdacdf150e4bd99 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 24 Mar 2013 23:46:17 -0700 Subject: [PATCH] Build in default marker icon images --- code/boot.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/code/boot.js b/code/boot.js index 60462b2a..3162b41d 100644 --- a/code/boot.js +++ b/code/boot.js @@ -320,14 +320,12 @@ function boot() { if(window.deviceID) console.log('Your device ID: ' + window.deviceID); window.runOnSmartphonesBeforeBoot(); - // overwrite default Leaflet Marker icon to be a neutral color - var base = '@@RESOURCEURLBASE@@/images'; - L.Icon.Default.imagePath = base; - var iconEnlImage = '@@INCLUDEIMAGE:images/marker-green.png@@'; var iconEnlRetImage = '@@INCLUDEIMAGE:images/marker-green_2x.png@@'; var iconResImage = '@@INCLUDEIMAGE:images/marker-blue.png@@'; var iconResRetImage = '@@INCLUDEIMAGE:images/marker-blue_2x.png@@'; + var iconDefImage = '@@INCLUDEIMAGE:images/marker-icon.png@@'; + var iconDefRetImage = '@@INCLUDEIMAGE:images/marker-icon_2x.png@@'; var iconShadowImage = '@@INCLUDEIMAGE:images/marker-shadow.png@@'; window.iconEnl = L.Icon.extend({options: { @@ -350,6 +348,16 @@ function boot() { popupAnchor: new L.Point(1, -34), shadowSize: new L.Point(41, 41) }}); + L.Icon.Default = L.Icon.extend({options: { + iconUrl: iconDefImage, + iconRetinaUrl: iconDefRetImage, + shadowUrl: iconShadowImage, + shadowRetinaUrl: iconShadowImage, + iconSize: new L.Point(25, 41), + iconAnchor: new L.Point(12, 41), + popupAnchor: new L.Point(1, -34), + shadowSize: new L.Point(41, 41) + }}); window.setupTaphold(); window.setupStyles();