Skip to content

DRAFT: feat(Map): add OpenStreetMap (OSM) provider for dxMap#34041

Open
AlisherAmonulloev wants to merge 4 commits into
26_1from
osm-research_26_1
Open

DRAFT: feat(Map): add OpenStreetMap (OSM) provider for dxMap#34041
AlisherAmonulloev wants to merge 4 commits into
26_1from
osm-research_26_1

Conversation

@AlisherAmonulloev

Copy link
Copy Markdown
Contributor

Keyless, Leaflet-based OSM provider (provider: 'osm'). Tiles, geocoding and routing are supplied by the consumer via providerConfig.{tileServer, geocodeLocation, getRoute} rather than bundled, so no public OSM tile server is used by default. Adds errors W1030/W1031/W1032 for missing tile server, geocode callback and attribution.

  • New provider implementation and Leaflet integration
  • 'osm' added to MapProvider; providerConfig OSM types in map.d.ts
  • Regenerated React/Vue/Angular wrappers and aspnet metadata enum
  • React Storybook story (Map/OSM Provider)
  • Unit tests with a Leaflet mock

Keyless, Leaflet-based OSM provider (provider: 'osm'). Tiles, geocoding and
routing are supplied by the consumer via providerConfig.{tileServer,
geocodeLocation, getRoute} rather than bundled, so no public OSM tile server is
used by default. Adds errors W1030/W1031/W1032 for missing tile server,
geocode callback and attribution.

- New provider implementation and Leaflet integration
- 'osm' added to MapProvider; providerConfig OSM types in map.d.ts
- Regenerated React/Vue/Angular wrappers and aspnet metadata enum
- React Storybook story (Map/OSM Provider)
- Unit tests with a Leaflet mock
@AlisherAmonulloev AlisherAmonulloev self-assigned this Jun 17, 2026
Copilot AI review requested due to automatic review settings June 17, 2026 10:27
@AlisherAmonulloev AlisherAmonulloev requested a review from a team as a code owner June 17, 2026 10:27
@github-actions github-actions Bot added the .d.ts label Jun 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new provider: 'osm' option for dxMap, implementing an OpenStreetMap provider backed by Leaflet. It introduces OSM-specific providerConfig hooks (tiles/geocoding/routing provided by the consumer), integrates the provider into the core Map widget, updates typings/metadata/wrappers, and adds a Leaflet mock plus QUnit coverage and a React Storybook example.

Changes:

  • Added a Leaflet-based OSM dynamic provider and hooked it into dxMap’s provider registry and option-change pipeline (incl. runtime tileServer updates).
  • Extended public typings (MapProvider, OSM callback/types) and propagated the new provider to metadata and framework wrappers.
  • Added QUnit test coverage for the new provider using a Leaflet mock, plus a React Storybook story demonstrating configuration.

Reviewed changes

Copilot reviewed 16 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/devextreme/ts/dx.all.d.ts Adds 'osm' to MapProvider and includes OSM-related public types/options in the aggregated typings output.
packages/devextreme/js/ui/map.d.ts Adds 'osm' provider type and introduces public OSM callback/tile server types plus providerConfig fields.
packages/devextreme/js/ui/map_types.d.ts Re-exports newly added OSM public types from ui/map.
packages/devextreme/js/ui/widget/ui.errors.js Adds new warnings W1030/W1031/W1032 for OSM configuration issues.
packages/devextreme/js/__internal/ui/map/provider.ts Adds a default updateTileServer() hook and adjusts apiKey lookup typing for non-keyed providers like osm.
packages/devextreme/js/__internal/ui/map/provider.dynamic.ts Extends geocoding cache typing to support plain {lat,lng} results for OSM.
packages/devextreme/js/__internal/ui/map/provider.dynamic.osm.ts New Leaflet-based OSM provider implementation (tiles, geocoding callback, routing callback + fallback).
packages/devextreme/js/__internal/ui/map/map.ts Registers the osm provider and adds a targeted option-change path for providerConfig.tileServer.
packages/devextreme/testing/helpers/forMap/leafletMock.js New Leaflet mock used by unit tests.
packages/devextreme/testing/tests/DevExpress.ui.widgets/mapParts/osmTests.js New QUnit suite covering OSM loading, options, tiles, markers, routes, and cleanup behavior.
packages/devextreme/testing/tests/DevExpress.ui.widgets/map.tests.js Includes the new OSM test module in the map test entrypoint.
packages/devextreme/eslint.config.mjs Extends spellchecker skipWords for OSM/Leaflet domain terms used by the feature.
packages/devextreme-metadata/aspnet/enums.ts Adds 'osm' to the ASP.NET GeoMapProvider enum metadata.
packages/devextreme-react/src/map.ts Propagates new OSM providerConfig types into the generated React wrapper types.
packages/devextreme-vue/src/map.ts Propagates new OSM providerConfig types/props/emits into the generated Vue wrapper.
packages/devextreme-angular/src/ui/nested/provider-config.ts Adds OSM providerConfig inputs to the generated Angular nested option component.
packages/devextreme-angular/src/ui/map/nested/provider-config.ts Adds OSM providerConfig inputs to the generated Angular map nested option component.
packages/devextreme-angular/src/ui/map/index.ts Extends Angular Map component typing for providerConfig and its change event to include OSM hooks.
apps/react-storybook/stories/map/OSMMap.stories.tsx New Storybook story demonstrating OSM provider configuration with commercial tile providers and OSRM routing.

Comment thread apps/react-storybook/stories/map/OSMMap.stories.tsx Outdated
@r-farkhutdinov r-farkhutdinov added the storybook Enables Storybook PR preview deployment label Jun 18, 2026
@r-farkhutdinov r-farkhutdinov removed the storybook Enables Storybook PR preview deployment label Jun 18, 2026
Copilot AI review requested due to automatic review settings June 18, 2026 14:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 19 changed files in this pull request and generated 3 comments.

Comment thread packages/devextreme/js/__internal/ui/map/provider.dynamic.osm.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants