Skip to content

Conversation

@Pessimistress
Copy link
Collaborator

Split API reference into separate sections for Mapbox and Maplibre


Note: props in this section are not reactive. They are only used once when the Map instance is constructed.

#### `mapLib`: any {#maplib}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to confirm, this prop still exists?

Is there any type inference from its value?

I'm looking at Hubble.gl right now as an example of a library compatible with both maplibre and mapbox, so I'll be looking at how common types flow into the maps.

I don't think libs should use mapLib (instead, use either top-level Map component).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Users can still use mapLib to control how they include the base map library:

  • In the same bundle (import maplibregl from 'maplibre-gl' then mapLib={maplibregl})
  • Split bundle (mapLib={import('maplibre-gl')})
  • Script tag (mapLib={window.maplibregl})

@Pessimistress Pessimistress merged commit 154cb3c into next Jan 26, 2025
1 check passed
@Pessimistress Pessimistress deleted the x/docs branch January 26, 2025 20:20
Pessimistress added a commit that referenced this pull request Jan 28, 2025
Pessimistress added a commit that referenced this pull request Jan 28, 2025
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.

3 participants