Skip to content

Commit 3265ef4

Browse files
committed
Update leaflet to 142f94a9ba5757f7e7180ffa6cbed2b3a9bc73c9
1 parent 162962f commit 3265ef4

File tree

6 files changed

+21
-18
lines changed

6 files changed

+21
-18
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"homepage": "https://github.com/simon04/tyrolean-map#readme",
2323
"dependencies": {
24-
"leaflet": "^1.9.4",
24+
"leaflet": "https://github.com/Leaflet/Leaflet#142f94a9ba5757f7e7180ffa6cbed2b3a9bc73c9",
2525
"leaflet-control-geocoder": "^3.1.0",
2626
"leaflet.locatecontrol": "^0.83.0"
2727
},

src/app.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as L from 'leaflet';
2-
import 'leaflet/dist/leaflet.css';
2+
import 'leaflet.css';
33
import {Geocoder as GeocoderControl} from 'leaflet-control-geocoder';
44
import 'leaflet-control-geocoder/style.css';
55
import {LocateControl} from 'leaflet.locatecontrol';
@@ -14,16 +14,6 @@ map.attributionControl.setPrefix(false);
1414
const collapsed = window.matchMedia && window.matchMedia('all and (max-width: 700px)').matches;
1515
const layers = new CollapsableLayerControl({}, {}, {collapsed: collapsed}).addTo(map);
1616

17-
delete (L.Icon.Default.prototype as any)._getIconUrl;
18-
import iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';
19-
import iconUrl from 'leaflet/dist/images/marker-icon.png';
20-
import shadowUrl from 'leaflet/dist/images/marker-shadow.png';
21-
L.Icon.Default.mergeOptions({
22-
iconRetinaUrl,
23-
iconUrl,
24-
shadowUrl,
25-
});
26-
2717
new GeocoderControl({
2818
position: 'topleft',
2919
}).addTo(map);

src/leaflet-collapsable-layer-control.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import * as L from 'leaflet';
2+
13
/**
24
* A Leaflet Layer Control, which may be expanded by default, but may be collapsed using a button.
35
*

src/leaflet-fullHash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default class LeafletHash {
1010
changeTimeout = null;
1111
isListening = false;
1212
constructor(map: L.Map, options: Record<string, L.Layer>) {
13-
this.onHashChange = L.Util.bind(this.onHashChange, this);
13+
this.onHashChange = this.onHashChange.bind(this);
1414
if (map) {
1515
this.init(map, options);
1616
}

vite.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
import { defineConfig } from 'vite'
3+
4+
export default defineConfig({
5+
resolve: {
6+
alias: {
7+
'leaflet': __dirname + '/node_modules/leaflet/src/Leaflet.js',
8+
'leaflet.css': __dirname + '/node_modules/leaflet/dist/leaflet.css',
9+
},
10+
}
11+
})

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -914,10 +914,10 @@ __metadata:
914914
languageName: node
915915
linkType: hard
916916

917-
"leaflet@npm:^1.9.4":
918-
version: 1.9.4
919-
resolution: "leaflet@npm:1.9.4"
920-
checksum: 10c0/f639441dbb7eb9ae3fcd29ffd7d3508f6c6106892441634b0232fafb9ffb1588b05a8244ec7085de2c98b5ed703894df246898477836cfd0ce5b96d4717b5ca1
917+
"leaflet@https://github.com/Leaflet/Leaflet#142f94a9ba5757f7e7180ffa6cbed2b3a9bc73c9":
918+
version: 1.9.2
919+
resolution: "leaflet@https://github.com/Leaflet/Leaflet.git#commit=142f94a9ba5757f7e7180ffa6cbed2b3a9bc73c9"
920+
checksum: 10c0/6709c8ce921828dba1e20680c7837be2563e0815a41e9da31978dec287008e85fcb06e68155e54963cc7b59ce34c644e69762ea1c916ee1124004c39c2c6457a
921921
languageName: node
922922
linkType: hard
923923

@@ -1544,7 +1544,7 @@ __metadata:
15441544
dependencies:
15451545
"@types/leaflet": "npm:^1.9.15"
15461546
"@types/leaflet.locatecontrol": "npm:^0.74.6"
1547-
leaflet: "npm:^1.9.4"
1547+
leaflet: "https://github.com/Leaflet/Leaflet#142f94a9ba5757f7e7180ffa6cbed2b3a9bc73c9"
15481548
leaflet-control-geocoder: "npm:^3.1.0"
15491549
leaflet.locatecontrol: "npm:^0.83.0"
15501550
prettier: "npm:^3.4.2"

0 commit comments

Comments
 (0)