Skip to content

PB-207 : GeoJSON data autoreload #721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 21, 2024
Merged

Conversation

pakb
Copy link
Contributor

@pakb pakb commented Mar 20, 2024

Copy link

cypress bot commented Mar 20, 2024

Passing run #1216 ↗︎

0 173 22 0 Flakiness 0

Details:

Add loading bar toggling when loading GeoJSON data
Project: web-mapviewer Commit: 0ca4f392ea
Status: Passed Duration: 04:43 💡
Started: Mar 21, 2024 8:09 AM Ended: Mar 21, 2024 8:13 AM

Review all test suite changes for PR #721 ↗︎

@pakb pakb requested review from ltkum, ltshb and LukasJoss March 20, 2024 08:51
@pakb pakb force-pushed the feat_PB-207_geojson_data_autoreload branch 2 times, most recently from b21282c to c00a404 Compare March 20, 2024 10:57
@pakb pakb force-pushed the feat_PB-207_geojson_data_autoreload branch 2 times, most recently from 488e29e to 66e8bd6 Compare March 20, 2024 15:10
@pakb pakb requested a review from ltshb March 20, 2024 15:18
pakb added 4 commits March 21, 2024 08:26
when an updateDelay is set in the layer's config
when reprojecting GeoJSON data, select the CRS described in the GeoJSON (if any) directly in the reproject utils (we were parsing this CRS multiple times)
ca8825
as some features from "Charging points for electrical cars" are balloon like, and are offset from the center of the feature coordinate (meaning we don't have a hit when clicking on the balloon) 23408d
revert back to a bulk update on GeoJSON data initial load
manage a removal of layer by index with auto-reload intervals
@pakb pakb force-pushed the feat_PB-207_geojson_data_autoreload branch from 66e8bd6 to 70de725 Compare March 21, 2024 07:27
Comment on lines +40 to +47
const layerCopy = geoJsonLayer.clone()
layerCopy.geoJsonData = data
// we update through the action updateLayers, so that if multiple copies of the same GeoJSON layer are present,
// they will all be updated with the fresh data
store.dispatch('updateLayers', {
layers: [layerCopy],
...dispatcher,
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is all good, but just as information, here instead of doing the clone you do

store.dispatch('updateLayers', {layers: [{id: geoJsonLayer.id, geoJsonData: data}], ...dispatcher})

But no need to change both are ok and good in my opinion

@pakb pakb merged commit c48f177 into develop Mar 21, 2024
6 checks passed
@pakb pakb deleted the feat_PB-207_geojson_data_autoreload branch March 21, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants