Skip to content

Make mapId optional in DeckGlContextProvider#262

Merged
cioddi merged 2 commits intomainfrom
copilot/make-mapid-optional-prop
Mar 18, 2026
Merged

Make mapId optional in DeckGlContextProvider#262
cioddi merged 2 commits intomainfrom
copilot/make-mapid-optional-prop

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

DeckGlContextProvider required mapId as a mandatory prop, forcing explicit map identification even in single-map setups where a default map is available.

Changes

  • packages/deck-gl/src/contexts/DeckGlContext.tsx: Changed mapId: stringmapId?: string in DeckGlContextProviderProps

When mapId is omitted, useMap already falls back to the default registered map instance — consistent with the existing pattern across other hooks (useAddImage, useFitLayerBounds, etc.).

Usage

// Before: mapId was always required
<DeckGlContextProvider mapId="main-map">
  <App />
</DeckGlContextProvider>

// After: mapId is optional; omitting it uses the default map
<DeckGlContextProvider>
  <App />
</DeckGlContextProvider>

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: cioddi <761817+cioddi@users.noreply.github.com>
Copilot AI changed the title [WIP] Make mapId in DeckGlContextProvider an optional prop Make mapId optional in DeckGlContextProvider Mar 18, 2026
Copilot AI requested a review from cioddi March 18, 2026 16:25
@cioddi cioddi marked this pull request as ready for review March 18, 2026 16:35
@cioddi cioddi merged commit c41af13 into main Mar 18, 2026
5 checks passed
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.

2 participants