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

Add background image configuration to map component #197

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

robinmolen
Copy link
Contributor

Part of open-formulieren/open-forms#2173

The map component now has background configuration. This changes the image which is used for the leaflet tile layer (the background of the map component)

@robinmolen
Copy link
Contributor Author

robinmolen commented Dec 3, 2024

This depends on a change in the type library. Keeping this as draft, until those have been added

@robinmolen robinmolen force-pushed the feature/2173-map-background-configuration branch from 92918cd to 9dda5d2 Compare December 3, 2024 15:34
@robinmolen robinmolen requested review from vaszig and removed request for sergei-maertens December 4, 2024 09:55
Copy link
Contributor

@vaszig vaszig left a comment

Choose a reason for hiding this comment

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

I don't see something weird. I didn't manage though to test this manually (tried with npm pack and then installed it in the backend) so I guess @sergei-maertens has to do another review here.

src/context.ts Outdated Show resolved Hide resolved
src/registry/map/edit.tsx Outdated Show resolved Hide resolved
@robinmolen robinmolen force-pushed the feature/2173-map-background-configuration branch from 9dda5d2 to f332bca Compare December 5, 2024 16:13
src/context.ts Outdated Show resolved Hide resolved
src/context.ts Outdated
@@ -48,6 +59,7 @@ export interface BuilderContextType {
getDocumentTypes: () => Promise<Array<DocumentTypeOption>>;
getConfidentialityLevels: () => Promise<SelectOption[]>;
getAuthPlugins: () => Promise<AuthPluginOption[]>;
getMapTileLayers: () => Promise<MapTileLayers[]>;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
getMapTileLayers: () => Promise<MapTileLayers[]>;
getMapTileLayers: () => Promise<MapTileLayer[]>;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've fixed this

src/registry/map/edit.tsx Outdated Show resolved Hide resolved
src/registry/map/preview.tsx Outdated Show resolved Hide resolved
src/registry/map/preview.tsx Outdated Show resolved Hide resolved
src/tests/sharedUtils.tsx Outdated Show resolved Hide resolved
src/tests/sharedUtils.tsx Outdated Show resolved Hide resolved
@robinmolen robinmolen force-pushed the feature/2173-map-background-configuration branch from f332bca to 0c13e8b Compare December 9, 2024 11:02
@robinmolen robinmolen marked this pull request as ready for review December 9, 2024 13:25
},
modal: {noModal: true},
},
} as Meta<typeof Loader>;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
} as Meta<typeof Loader>;
} satisfies Meta<typeof Loader>;

this should be preferred since it doesn't just cast the type, it performs the proper type checks still :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah okay cool! Yeah that sounds a lot better 👌

src/components/builder/loader.stories.tsx Outdated Show resolved Hide resolved
src/components/builder/loader.stories.tsx Outdated Show resolved Hide resolved
src/registry/map/edit.tsx Outdated Show resolved Hide resolved
@robinmolen robinmolen force-pushed the feature/2173-map-background-configuration branch from 0c13e8b to 7013ba4 Compare December 11, 2024 13:56
Copy link
Member

@sergei-maertens sergei-maertens left a comment

Choose a reason for hiding this comment

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

Good to merge, and then bag it and tag it! 🚀

@robinmolen robinmolen merged commit 72b2faa into main Dec 12, 2024
13 checks passed
@robinmolen robinmolen deleted the feature/2173-map-background-configuration branch December 12, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kaartmateriaal - Selecteeren eigen achtergrondkaart (PDOK/WMS/WMTS)
3 participants