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 3D Terrain components #164

Merged
merged 12 commits into from
May 16, 2024
Merged

Add 3D Terrain components #164

merged 12 commits into from
May 16, 2024

Conversation

larsmaxfield
Copy link
Contributor

@larsmaxfield larsmaxfield commented May 13, 2024

I've added components to achieve 3D terrain and hillshading as demoed on MapLibre's 3D Terrain page:

  • RasterDEMTileSource
  • HillshadeLayer
  • Terrain
  • TerrainControl

I've added a corresponding demo to Examples. This reflects the original 3D Terrain page from MapLibre with some added modifiable items:

3D Terrain demo page for svelte-maplibre

This has not been tested, and I have not added a changeset which I see here is requested. I'm not sure how to do either — but I'd like to learn, if possible. *This has not been tested.

Lastly, let me know if there's anything you'd like me to explain or justify. I'm new to Svelte and web development in general, so I may have goofed up (or completely missed) a best practice.

Resolves #163

…d TerrainControl seems to add/connect the terrain source to the map when clicked (on startup, terrain is not available), perhaps will need "Terrain" component within terrain raster-dem source which does the "style: {terrain:}" bit
…e because MapLibre does not have "removeTerrain", only a setter and getter
…demo of 3D Terrain; add modifiable elements to that page for hillshade and terrain settings
Copy link

changeset-bot bot commented May 13, 2024

🦋 Changeset detected

Latest commit: c5c4d89

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

This PR includes changesets to release 1 package
Name Type
svelte-maplibre Minor

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

vercel bot commented May 13, 2024

@larsmaxfield is attempting to deploy a commit to the Daniel Imfeld's projects Team on Vercel.

A member of the Team first needs to authorize it.

@larsmaxfield
Copy link
Contributor Author

I see that package-lock.json is being added with this PR. It does not exist in main. Should I remove that?

@dimfeld
Copy link
Owner

dimfeld commented May 13, 2024

Yeah, please remove the package-lock.json file. I use pnpm (https://pnpm.io/) for package management in this repo, which uses the pnpm-lock.yaml instead.

I'll try to set aside some time to look at this in a day or two, but first glance looks good. Thanks!

Copy link

vercel bot commented May 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svelte-maplibre ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2024 7:15pm

@larsmaxfield
Copy link
Contributor Author

Yeah, please remove the package-lock.json file.

Done!

I use pnpm (https://pnpm.io/) for package management in this repo, which uses the pnpm-lock.yaml instead.

I'll take a look at using this as well in the future.

I'll try to set aside some time to look at this in a day or two, but first glance looks good. Thanks!

You're welcome — and thank you!

@dimfeld
Copy link
Owner

dimfeld commented May 16, 2024

This is great. Thanks for contributing!

@dimfeld dimfeld merged commit 39371ee into dimfeld:master May 16, 2024
1 check failed
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.

Add 3D Terrain components
2 participants