-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: simplify props related to configuring basemap layers #476
Conversation
✅ Deploy Preview for oslmap ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
source.getUrls()?.forEach((url) => expect(url).toMatch(/api.os.uk/)); | ||
}); | ||
|
||
it.skip("loads MapboxSatellite basemap when a Mapbox access token is provided", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See @todo
comment in layers.ts
- can't quite figure out how to set a custom property on a VectorLayer
specifically! Not throwing any openlayer type errors, but also not coming through in the layer markup.
Feature working as expected, just relying on name
for test-ability!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tricky one! I'd try logging out getAllLayers()
and check we're not falling back to OSM here for some reason related to our testing setup. Sure you've tried this! Happy to take a closer look if this still doesn't narrow things down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small comments / suggestions!
source.getUrls()?.forEach((url) => expect(url).toMatch(/api.os.uk/)); | ||
}); | ||
|
||
it.skip("loads MapboxSatellite basemap when a Mapbox access token is provided", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tricky one! I'd try logging out getAllLayers()
and check we're not falling back to OSM here for some reason related to our testing setup. Sure you've tried this! Happy to take a closer look if this still doesn't narrow things down.
Going to merge this one as-is for an |
Follow-up per #475 (comment) & #473 (and working towards a stable release to support
MapAndLabel
in Planx!)Key changes:
basemap
prop with enum values"OSVectorTile" (default) | "OSRaster" | "MapboxSatellite" | "OSM"
disableVectorTiles
andapplySatelliteStyle
osApiKey
(across map and address-autocomplete components)osVectorTilesApiKey
,osFeaturesApiKey
,osPlacesApiKey
osCopyright
default string to no longer use our license number 🙈os-layers.ts
(renaming file tolayers.ts
since now OSM & Mapbox too) & adds more complete test coverage