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 InputMap component #1951

Closed
wants to merge 22 commits into from
Closed

Add InputMap component #1951

wants to merge 22 commits into from

Conversation

csjh
Copy link
Contributor

@csjh csjh commented May 1, 2024

Description

Adapts @evidence-dev/labs LeafletMap component into an InputMap component

image

Checklist

  • I have added a changeset
  • I have added to the docs where applicable

Copy link

changeset-bot bot commented May 1, 2024

🦋 Changeset detected

Latest commit: 348d339

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@evidence-dev/core-components Minor
@evidence-dev/evidence Major
my-evidence-project Patch
@evidence-dev/components Patch
evidence-test-environment Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented May 1, 2024

Deploy Preview for next-docs-evidence ready!

Name Link
🔨 Latest commit 348d339
🔍 Latest deploy log https://app.netlify.com/sites/next-docs-evidence/deploys/6633c71f45bf070008f6514e
😎 Deploy Preview https://deploy-preview-1951--next-docs-evidence.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented May 1, 2024

Deploy Preview for evidence-development-workspace ready!

Name Link
🔨 Latest commit 348d339
🔍 Latest deploy log https://app.netlify.com/sites/evidence-development-workspace/deploys/6633c71ffb69ef0008d20ff8
😎 Deploy Preview https://deploy-preview-1951--evidence-development-workspace.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@csjh csjh requested review from mcrascal and ItsMeBrianD May 1, 2024 17:17
@csjh csjh linked an issue May 1, 2024 that may be closed by this pull request
@Youssef-Harby
Copy link

I will be happy if you support also the other geometry types like lines, polygons, multi-geometry.

Comment on lines +133 to +144
function leafletAction(el, data) {
const actionPromise = asyncLeafletAction(el, data);

return {
destroy() {
actionPromise.then((action) => action.destroy());
},
update(newData) {
actionPromise.then((action) => action.update(newData));
}
};
}
Copy link
Member

Choose a reason for hiding this comment

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

Stylistic choice but I think this should go in it's own file

Copy link
Contributor Author

@csjh csjh May 2, 2024

Choose a reason for hiding this comment

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

I'm not really a fan of it going in a separate file - all the captured variables have to be forwarded in, which gets ugly

@hughess
Copy link
Member

hughess commented May 2, 2024

This is awesome!

I think we should hold this one until we've got a final syntax we want to use for maps, and release it all at once. There's features for choropleths and tooltips I want to pull in from a custom prototype I've got, so I'll bring those changes into here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Map for plotting points of interest
4 participants