Skip to content

Conversation

@prushforth
Copy link
Member

Use nodeResolve() in rollup to import node_modules by name
Refactor global L.symbol use to use imported symbol of same name from "leaflet" import.

Update module specifiers to include ".js" where it is a file for consistency.

Update package.json to use specific forks of
proj4leaflet (module version), leaflet-locatecontrol (module version)

Get import of proj4leaflet from specific branch of maps4html/proj4leaflet fork, which may never get merged upstream, but keeps differences in a git repo, at least, instead of in the build script.

Update some tests to import the leaflet module directly

Create window.L so that protomaps-leaflet will work.

Add rollup alias plugin to allow rollup to resove import of 'leaflet' to correct file (Leaflet lacks a "module" key as of 1.9.4)

Get import of proj4 from the module code that ships with that project. The maps4html/proj4leaflet fork works with proj4 code as shipped.

@prushforth prushforth requested a review from AliyanH October 28, 2024 01:03
@prushforth prushforth force-pushed the es6-modularization branch 4 times, most recently from 7c9f417 to 81d3922 Compare October 29, 2024 00:13
Refactor / remove global L.symbol use to use
imported symbol of same name from "leaflet" import.

Update module specifiers to include ".js" where it is a file
in this project for consistency.

Update package.json to use specific forks of
proj4leaflet (module version), leaflet-locatecontrol (module version)

Get import of proj4leaflet from specific branch of maps4html/proj4leaflet
fork, which may never get merged upstream, but keeps differences in a
git repo, at least, instead of in the build script.

Update some tests to import the leaflet module directly

Create window.L.GridLayer, .L.DomUtil so that protomaps-leaflet will work.

Add rollup alias plugin to allow rollup to resove import of 'leaflet' to
correct file (Leaflet lacks a "module" key as of 1.9.4). This
allows us to not have to modify what's in node_modules.

Get import of proj4 from the module code that ships with that project.
The maps4html/proj4leaflet fork works with proj4 code as shipped.

Update "module","main" keys with correct path
relative to dist/ subdirectory

Use npm-installed esm version of leaflet-locatecontrol
control class, testing _isExpanded property only.  Force touch device
emulation by changing how context is launched, options passed.
@prushforth prushforth merged commit dc67a5d into Maps4HTML:main Oct 30, 2024
1 check 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.

1 participant