Skip to content
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

Kaartmateriaal - Verschillende types kaart-interactie (Point, Polygon en Line) #2177

Open
Tracked by #4880

Comments

@joeribekker
Copy link
Contributor

joeribekker commented Oct 14, 2022

Ik wil als bouwer dat de klant gebruik kan maken van de types point, polygon en line voor kaart-interactie, zodat dat de klant verschillende opties voor het aangeven van een locatie tot zijn beschikking heeft.

Oorsprong: Dimpact-Samenwerking/Open-Formulieren#44 RTM: 7.4 Story points: 20 Business value: 3

@joeribekker joeribekker changed the title Ik wil als bouwer dat de klant gebruik kan maken van de types point, polygon en line voor kaart-interactie Kaartmateriaal - Verschillende types kaart-interactie (Point, Polygon en Line) May 1, 2023
@joeribekker joeribekker added owner: haarlemmermeer sprint-18 Tijdelijk label and removed sprint-14 Tijdelijk label labels May 1, 2023
@joeribekker joeribekker removed the sprint-18 Tijdelijk label label Jun 22, 2023
@robinmolen
Copy link
Contributor

Besproken met Joeri Diederen. We gaan in het formulier beheer bij het kaartmateriaal veld instellingen toevoegen om de kaart interactie te bepalen. Dit gaat middels radio knoppen, met Point als standaard keuze (hoe het kaartmateriaal veld nu ook werkt).

Bij het opslaan van een 'submission' wordt aangegeven wat voor kaart interactie was gebruikt. Hiervoor gebruiken we het geoJson formaat

@robinmolen robinmolen moved this from In Progress to Todo in Development Dec 3, 2024
@robinmolen robinmolen moved this from Todo to In Progress in Development Dec 3, 2024
robinmolen added a commit to open-formulieren/types that referenced this issue Dec 3, 2024
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Dec 3, 2024
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 9, 2024
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 9, 2024
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 9, 2024
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Dec 9, 2024
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 10, 2024
Added leaflet-draw and react-leaflet-draw as dependencies. These allow easy user interactions with the leaflet map
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 10, 2024
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 10, 2024
…ead of coordinates

The map component now uses and stores geoJson data, instead of coordinates. This means we can display and work with multiple shapes.

One important change is that geoJson saves coordinates as lng-lat, instead of lat-lng
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 10, 2024
…ponent property

With the new property `interactions` the component can defined the possible map interactions. Currently supporting 'marker', 'polygon', 'polyline' and 'circle'
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 10, 2024
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 10, 2024
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 10, 2024
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 10, 2024
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Dec 10, 2024
robinmolen added a commit to open-formulieren/open-forms-sdk that referenced this issue Jan 14, 2025
…eoJson geometry

Because we won't support circle shapes (due to geoJson and the backend registrations not supporting this type), we no longer need the geoJson feature `properties`.

Because we don't use `properties` for anything else, it doesn't make sense to save it
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 14, 2025
The React-leaflet-draw package seems abandoned. As such, a fix for the typescript issue (alex3165/react-leaflet-draw#188) probably won't happen anytime soon

The .patch file, in `/patches`, contains the fix needed for the react-leaflet-draw index.d.ts file.

The problem with this solution, is that this only solves it for this project. If we introduce typescript to the SDK (or any other project using `react-leaflet-draw`), this problem will need to be solved again
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 15, 2025
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 15, 2025
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 15, 2025
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 15, 2025
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 15, 2025
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 15, 2025
Both changes are needed for the leaflet-draw and react-leaflet-draw dependencies.

leaflet-draw uses images for the different markers, which are included in the css. For this to work with the scss build, .png and .svg files use the dataurl loader https://esbuild.github.io/content-types/#data-url

Typescript errors in the react-leaflet-draw dependency caused a typescript validation/error, which shouldn't happen. Using `skipLibCheck` in the tsconfig.json type issues in the node_modules folder are ignored
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 15, 2025
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 15, 2025
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 15, 2025
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 15, 2025
The React-leaflet-draw package seems abandoned. As such, a fix for the typescript issue (alex3165/react-leaflet-draw#188) probably won't happen anytime soon

The .patch file, in `/patches`, contains the fix needed for the react-leaflet-draw index.d.ts file.

The problem with this solution, is that this only solves it for this project. If we introduce typescript to the SDK (or any other project using `react-leaflet-draw`), this problem will need to be solved again
robinmolen added a commit to open-formulieren/formio-builder that referenced this issue Jan 15, 2025
robinmolen added a commit that referenced this issue Jan 15, 2025
Map component that don't have interactions configuration, will receive the default config when importing using the migration_converters
@github-project-automation github-project-automation bot moved this from Implemented to Done in Development Jan 15, 2025
@robinmolen robinmolen moved this from Done to Implemented in Development Jan 15, 2025
@github-project-automation github-project-automation bot moved this from Implemented to In Progress in Development Jan 15, 2025
robinmolen added a commit that referenced this issue Jan 15, 2025
For the map interaction changes, we need to save the map data in a different format. This is to allow us to differentiate between point, line or polygon map information.

At the moment we only need the geometry information of the geoJson, so thats what we will store. The other geoJson information, `type` and `properties`, are at the moment not used. In addition, the backend registrations (objects API, ZGW APIs and StUF-ZDS) also only need the geometry information.
robinmolen added a commit that referenced this issue Jan 15, 2025
The backend registration plugins (Objects API, ZGW APIs and StUF-ZDS) now support point, line and polygon geojson geometries.
robinmolen added a commit that referenced this issue Jan 15, 2025
robinmolen added a commit that referenced this issue Jan 15, 2025
Map component that don't have interactions configuration, will receive the default config when importing using the migration_converters
robinmolen added a commit that referenced this issue Jan 15, 2025
robinmolen added a commit that referenced this issue Jan 15, 2025
The form designer configuration for the map component has changed a bit.
So are the map specific settings moved to the 'Map settings' tab. Also, the label for initial lat/lng settings has been changed to 'Initial focus'
@sergei-maertens sergei-maertens moved this from In Progress to Implemented in Development Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment