Skip to content

Commit

Permalink
chore: upgrade cluster plugin #417
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Nov 4, 2024
1 parent 63efbd1 commit 6e31376
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 7 deletions.
1 change: 1 addition & 0 deletions components/MainMap/MapFeatures.vue
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ export default defineNuxtComponent({
this.teritorioCluster = new TeritorioCluster(map, POI_SOURCE, {
clusterRenderFn: clusterRender,
fitBoundsOptions: this.mapBase?.fitBoundsOptions(),
initialFeature: this.selectedFeature as unknown as MapGeoJSONFeature,
markerRenderFn: markerRender,
markerSize: 32,
Expand Down
4 changes: 3 additions & 1 deletion components/Map/MapBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ export default defineNuxtComponent({
},
setup() {
const { boundOptions, selectedFeature } = storeToRefs(useMapStore())
const { boundOptions, selectedFeature, teritorioCluster } = storeToRefs(useMapStore())
return {
boundOptions,
selectedFeature,
teritorioCluster,
}
},
Expand Down Expand Up @@ -140,6 +141,7 @@ export default defineNuxtComponent({
fitBoundsPaddingOptions: {
handler() {
this.boundOptions = this.fitBoundsOptions()
this.teritorioCluster?.setBoundsOptions(this.boundOptions)
},
immediate: true,
},
Expand Down
1 change: 1 addition & 0 deletions components/Map/MapPois.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export default defineNuxtComponent({
this.teritorioCluster = new TeritorioCluster(map, POI_SOURCE, {
clusterRenderFn: clusterRender,
fitBoundsOptions: this.mapBase?.fitBoundsOptions(),
markerRenderFn: markerRender,
markerSize: 32,
pinMarkerRenderFn: pinMarkerRender,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@sentry/vue": "^8.35.0",
"@tailwindcss/typography": "^0.5.9",
"@teritorio/map": "^0.12.7",
"@teritorio/maplibre-gl-teritorio-cluster": "^0.0.8",
"@teritorio/maplibre-gl-teritorio-cluster": "^0.0.10",
"@teritorio/openmaptiles-gl-language": "^1.5.4",
"@turf/boolean-intersects": "^6.5.0",
"@turf/mask": "^7.1.0",
Expand Down
34 changes: 29 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3985,12 +3985,14 @@ __metadata:
languageName: node
linkType: hard

"@teritorio/maplibre-gl-teritorio-cluster@npm:^0.0.8":
version: 0.0.8
resolution: "@teritorio/maplibre-gl-teritorio-cluster@npm:0.0.8"
"@teritorio/maplibre-gl-teritorio-cluster@npm:^0.0.10":
version: 0.0.10
resolution: "@teritorio/maplibre-gl-teritorio-cluster@npm:0.0.10"
dependencies:
"@turf/bbox": "npm:^7.1.0"
"@turf/helpers": "npm:^7.1.0"
maplibre-gl: "npm:^4.7.0"
checksum: 10c0/f87519ce64cc49341678b18cbc143ca3b92152d039fd2666ff0e060e985a3cdbeea6979da3fab666c49c8a157b2c7c58e7db1b97bfc2354bddb66e0e82355e2c
checksum: 10c0/6c248337ea92e60659e1daf85a5891770a68551af455ff81562444301aa7e4c3ac58ea91af1cd30a5eba09f6b8cfc3484fb1451d2ffe8843740d7b340d299eec
languageName: node
linkType: hard

Expand Down Expand Up @@ -4030,7 +4032,7 @@ __metadata:
"@tailwindcss/typography": "npm:^0.5.9"
"@teritorio/font-teritorio": "npm:^2.5.0"
"@teritorio/map": "npm:^0.12.7"
"@teritorio/maplibre-gl-teritorio-cluster": "npm:^0.0.8"
"@teritorio/maplibre-gl-teritorio-cluster": "npm:^0.0.10"
"@teritorio/openmaptiles-gl-language": "npm:^1.5.4"
"@turf/boolean-intersects": "npm:^6.5.0"
"@turf/mask": "npm:^7.1.0"
Expand Down Expand Up @@ -4137,6 +4139,18 @@ __metadata:
languageName: node
linkType: hard

"@turf/bbox@npm:^7.1.0":
version: 7.1.0
resolution: "@turf/bbox@npm:7.1.0"
dependencies:
"@turf/helpers": "npm:^7.1.0"
"@turf/meta": "npm:^7.1.0"
"@types/geojson": "npm:^7946.0.10"
tslib: "npm:^2.6.2"
checksum: 10c0/901ed437ad1241b1c7cf76ee3f1dd998b32a59647074216d076a62080281693cc3f1d66d1dedd02fd5617ea57434ec059843bcc275d20f667019f3e1f378b05d
languageName: node
linkType: hard

"@turf/boolean-disjoint@npm:^6.5.0":
version: 6.5.0
resolution: "@turf/boolean-disjoint@npm:6.5.0"
Expand Down Expand Up @@ -4254,6 +4268,16 @@ __metadata:
languageName: node
linkType: hard

"@turf/meta@npm:^7.1.0":
version: 7.1.0
resolution: "@turf/meta@npm:7.1.0"
dependencies:
"@turf/helpers": "npm:^7.1.0"
"@types/geojson": "npm:^7946.0.10"
checksum: 10c0/c7aa77ddb28ef5068b031c1b422d2d5dc1df51975f727be42e2d8d500a026a2e667242d6aa06453f757cbd5ead2db0ba6b9a5d2fcf5ab496574cd4c0ae4fe325
languageName: node
linkType: hard

"@turf/polygon-to-line@npm:^6.5.0":
version: 6.5.0
resolution: "@turf/polygon-to-line@npm:6.5.0"
Expand Down

0 comments on commit 6e31376

Please sign in to comment.