Build in default marker icon images
This commit is contained in:
parent
8a7ed3dfb2
commit
953a50d0a9
16
code/boot.js
16
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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user