Skip to content

Commit

Permalink
Update leaflet to 142f94a9ba5757f7e7180ffa6cbed2b3a9bc73c9
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 committed Jan 5, 2025
1 parent 162962f commit 3265ef4
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"homepage": "https://github.com/simon04/tyrolean-map#readme",
"dependencies": {
"leaflet": "^1.9.4",
"leaflet": "https://github.com/Leaflet/Leaflet#142f94a9ba5757f7e7180ffa6cbed2b3a9bc73c9",
"leaflet-control-geocoder": "^3.1.0",
"leaflet.locatecontrol": "^0.83.0"
},
Expand Down
12 changes: 1 addition & 11 deletions src/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as L from 'leaflet';
import 'leaflet/dist/leaflet.css';
import 'leaflet.css';
import {Geocoder as GeocoderControl} from 'leaflet-control-geocoder';
import 'leaflet-control-geocoder/style.css';
import {LocateControl} from 'leaflet.locatecontrol';
Expand All @@ -14,16 +14,6 @@ map.attributionControl.setPrefix(false);
const collapsed = window.matchMedia && window.matchMedia('all and (max-width: 700px)').matches;
const layers = new CollapsableLayerControl({}, {}, {collapsed: collapsed}).addTo(map);

delete (L.Icon.Default.prototype as any)._getIconUrl;
import iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';
import iconUrl from 'leaflet/dist/images/marker-icon.png';
import shadowUrl from 'leaflet/dist/images/marker-shadow.png';
L.Icon.Default.mergeOptions({
iconRetinaUrl,
iconUrl,
shadowUrl,
});

new GeocoderControl({
position: 'topleft',
}).addTo(map);
Expand Down
2 changes: 2 additions & 0 deletions src/leaflet-collapsable-layer-control.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import * as L from 'leaflet';

/**
* A Leaflet Layer Control, which may be expanded by default, but may be collapsed using a button.
*
Expand Down
2 changes: 1 addition & 1 deletion src/leaflet-fullHash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class LeafletHash {
changeTimeout = null;
isListening = false;
constructor(map: L.Map, options: Record<string, L.Layer>) {
this.onHashChange = L.Util.bind(this.onHashChange, this);
this.onHashChange = this.onHashChange.bind(this);
if (map) {
this.init(map, options);
}
Expand Down
11 changes: 11 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

import { defineConfig } from 'vite'

export default defineConfig({
resolve: {
alias: {
'leaflet': __dirname + '/node_modules/leaflet/src/Leaflet.js',
'leaflet.css': __dirname + '/node_modules/leaflet/dist/leaflet.css',
},
}
})
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -914,10 +914,10 @@ __metadata:
languageName: node
linkType: hard

"leaflet@npm:^1.9.4":
version: 1.9.4
resolution: "leaflet@npm:1.9.4"
checksum: 10c0/f639441dbb7eb9ae3fcd29ffd7d3508f6c6106892441634b0232fafb9ffb1588b05a8244ec7085de2c98b5ed703894df246898477836cfd0ce5b96d4717b5ca1
"leaflet@https://github.com/Leaflet/Leaflet#142f94a9ba5757f7e7180ffa6cbed2b3a9bc73c9":
version: 1.9.2
resolution: "leaflet@https://github.com/Leaflet/Leaflet.git#commit=142f94a9ba5757f7e7180ffa6cbed2b3a9bc73c9"
checksum: 10c0/6709c8ce921828dba1e20680c7837be2563e0815a41e9da31978dec287008e85fcb06e68155e54963cc7b59ce34c644e69762ea1c916ee1124004c39c2c6457a
languageName: node
linkType: hard

Expand Down Expand Up @@ -1544,7 +1544,7 @@ __metadata:
dependencies:
"@types/leaflet": "npm:^1.9.15"
"@types/leaflet.locatecontrol": "npm:^0.74.6"
leaflet: "npm:^1.9.4"
leaflet: "https://github.com/Leaflet/Leaflet#142f94a9ba5757f7e7180ffa6cbed2b3a9bc73c9"
leaflet-control-geocoder: "npm:^3.1.0"
leaflet.locatecontrol: "npm:^0.83.0"
prettier: "npm:^3.4.2"
Expand Down

0 comments on commit 3265ef4

Please sign in to comment.