portaljs icon indicating copy to clipboard operation
portaljs copied to clipboard

Custom Tile Layer for Map Component

Open willy1989cv opened this issue 1 year ago • 2 comments

#1121 adds default tile layer and allows user to pass a tile object to map

willy1989cv avatar May 13 '24 14:05 willy1989cv

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

9 Ignored Deployments
Name Status Preview Comments Updated (UTC)
portaljs-alan-turing ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 8:43pm
portaljs-ckan ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 8:43pm
portaljs-ckan-ssg ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 8:43pm
portaljs-fivethirtyeight ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 8:43pm
portaljs-git-example ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 8:43pm
portaljs-learn ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 8:43pm
portaljs-openspending ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 8:43pm
portaljs-storybook ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 8:43pm
site-portaljs ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 8:43pm

vercel[bot] avatar May 13 '24 14:05 vercel[bot]

🦋 Changeset detected

Latest commit: 8e3496782c022b0653e07f217c6b315ba84e0e61

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

This PR includes changesets to release 1 package
Name Type
@portaljs/components 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

changeset-bot[bot] avatar May 13 '24 14:05 changeset-bot[bot]

Hey @willy1989cv let me know if you were able to address feedback from @demenech

anuveyatsu avatar May 31 '24 09:05 anuveyatsu

Hey @willy1989cv let me know if you were able to address feedback from @demenech

@anuveyatsu @demenech At the moment I've implemented the more flexible approach, giving the user the possibility to configure the tile layer using component properties or .env variables.

https://hackmd.io/gqYVE-yhQu-iNnuu_m00Eg

willy1989cv avatar May 31 '24 12:05 willy1989cv

@willy1989cv is this now good for a re-review?

rufuspollock avatar Jun 18 '24 13:06 rufuspollock

@willy1989cv is this now good for a re-review?

Hi @rufuspollock. Working on the adjustments as suggested by @demenech.

willy1989cv avatar Jun 18 '24 18:06 willy1989cv

@demenech please review latest changes. here's a small doc on how it works: https://hackmd.io/@1kPvEKNGQAa77DV7pjEh5Q/Sk0geNvEA

willy1989cv avatar Jun 18 '24 23:06 willy1989cv

@demenech working fine on my localhost @portaljs instance.

configured through properties:

# My Dataset

Built with PortalJS

## Map

<Map
    tileLayerName="MapBox"
    tileLayerOptions={{
        accessToken : "xxx"
    }}
/>

or via .env

NEXT_PUBLIC_MAP_TILE_LAYER_NAME=MapBox
NEXT_PUBLIC_MAP_TILE_LAYER_OPTION_accessToken=xxx

preview: image

cc: @anuveyatsu

willy1989cv avatar Jun 20 '24 11:06 willy1989cv

hey @willy1989cv that's great let's add a changeset and merge

demenech avatar Jun 20 '24 18:06 demenech