Skip to content

Conversation

felixpalmer
Copy link

Closes #2559


const DEFAULT_STYLE = {version: 8, sources: {}, layers: []} as StyleSpecification;

const DEFAULT_SETTINGS = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Where do these defaults come from, and should they be applied anywhere else to keep systems in sync?

Copy link
Author

Choose a reason for hiding this comment

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

I looked them up in the docs, they seem pretty reasonable. Only maxPitch is a bit weird, in that it depends on the library version. It would be nice if they could be extracted from the map lib at runtime, but I didn't see a way to do that

minPitch: 0,
maxPitch: 85,
maxBounds: [-180, -85.051129, 180, 85.051129],
projection: 'mercator',
Copy link
Contributor

Choose a reason for hiding this comment

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

Is projection in maplibre? Might want to cross reference https://www.maplibre.org/maplibre-gl-js/docs/API/type-aliases/MapOptions/

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a different API I think. That's the JSON style spec whereas this is the MapOptions for the js library

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.

[Bug] reuseMaps does not reset all reactive props

2 participants