Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create map-extent, map-input, map-link #887

Merged
merged 147 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
4cff6ea
initial map-input setup
prushforth May 24, 2023
90f1d79
implement Classes for different types of map-input types
prushforth May 26, 2023
fddb89d
Update map-input implementation + Add support for tilematrix type=loc…
AliyanH May 31, 2023
cef052b
initial map-link setup
prushforth Jun 8, 2023
dc565fc
Suspend CI for now
prushforth Sep 26, 2023
87fe027
Make map-input.connectedCallback async, await on extent.whenReady()
prushforth Sep 26, 2023
2bf9170
Update version to 0.12.0 in package.json
Sep 27, 2023
68139cd
WIP on migrating extent initialization from MapMLLayer to map-extent.js
Oct 3, 2023
bb15b34
WIP on migrating extent initialization from MapMLLayer to map-extent.js
Oct 3, 2023
dcf54a5
Initial working migration of map-extent initialization from MapMLLayer
Oct 4, 2023
77dc9b1
WIP updating and adding and removing layer control extent HTML
Oct 4, 2023
90087e1
Add comment re: current problem
Oct 4, 2023
366409a
WIP on map-extent hidden API
Oct 5, 2023
bd183af
Initial working hidden API for map-extent
prushforth Oct 5, 2023
f6373df
WIP on map-extent Get checkbox working via API map-extent.checked. Ch…
prushforth Oct 5, 2023
5ffd825
Fix TemplatedFeaturesLayer checking/unchecking behaviour.
Oct 6, 2023
baed9f1
Merge branch 'map-extent' of https://github.com/Maps4HTML/Web-Map-Cus…
prushforth Oct 7, 2023
5d3901a
Set 'Sub-layer' as default label attribute, add to options messages
prushforth Oct 10, 2023
83d64fd
Move/ refactor MapMLLayer._setLayerElExtent into layer.js layer-.extent
prushforth Oct 10, 2023
b6b43d3
Fix bug in _calculateExtent, add whenReady() to layer.zoomTo
prushforth Oct 10, 2023
df4aba6
Merge branch 'map-extent' of https://github.com/Maps4HTML/Web-Map-Cus…
prushforth Oct 11, 2023
a171a10
WIP get tests configured with new map-extent attributes.
prushforth Oct 11, 2023
ad11b9b
Fix a test done with map-extent hidden attribute implemented via CE
prushforth Oct 11, 2023
6268dae
Make opacity work the same in map-extent as it does in layer. This is
Oct 11, 2023
61e1b3b
Make layer-.extent (layer-._calculateExtent()) memoized
AliyanH Oct 11, 2023
93da663
Get map-extent label API working
AliyanH Oct 11, 2023
a9e1b5e
WIP fix/refactor query map-extents
AliyanH Oct 11, 2023
af9a1c8
avoid remote map-feature (in mapml) triggering MapFeature connectedCa…
yhy0217 Oct 12, 2023
c1b42cb
Fix remote queryable layer with hidden extent not queryable.
prushforth Oct 12, 2023
db9088b
Re-write AnnounceMovement.js totalBounds event handler to use
prushforth Oct 12, 2023
887c8df
create layer-.whenElemsReady method to check if the children elems of…
yhy0217 Oct 13, 2023
546ab5d
WIP on debugMode, totalLayerBounds, AnnounceMovement
Oct 13, 2023
e668d3a
Get debugMode.test.js working
Oct 13, 2023
68a2c62
featureIndexOverlayResults needs to be in slowMo to work reliably
prushforth Oct 16, 2023
d80ee50
WIP on multiple extents test semantics. Also, see todo file for disc…
prushforth Oct 17, 2023
666f542
Refactor layer.js._calculateExtent into
Oct 17, 2023
1a5c994
WIP on multiple extents test semantics. Also, see todo file for disc…
prushforth Oct 17, 2023
851d5be
Merge branch 'map-extent' of https://github.com/Maps4HTML/Web-Map-Cus…
prushforth Oct 18, 2023
bf189ec
get rid of layerControl._validateInput, make layer- and map-extent el…
yhy0217 Oct 19, 2023
7508e73
Upgrade playwright to 1.39.0
Oct 19, 2023
e191bd9
Merge branch 'map-extent' of https://github.com/Maps4HTML/Web-Map-Cus…
Oct 19, 2023
7b09570
WIP: refactor to get rid of _properties._mapExtents, make layer- and …
yhy0217 Oct 23, 2023
ca56c53
Merge branch 'map-extent' of https://github.com/Maps4HTML/Web-Map-Cus…
prushforth Oct 24, 2023
ad446c3
add event listener on layer- to listen to layer- checked property cha…
yhy0217 Oct 24, 2023
1534322
Merge branch 'map-extent' of https://github.com/Maps4HTML/Web-Map-Cus…
prushforth Oct 24, 2023
1b42138
remove trailing '/' from from xmlns links
AliyanH Oct 24, 2023
7821ea7
Merge branch 'map-extent' of https://github.com/Maps4HTML/Web-Map-Cus…
prushforth Oct 24, 2023
dbd5386
Init checkbox defaultChecked for map-extent, layer-
prushforth Oct 24, 2023
2ea54ea
get rid of MapMLLayer._validateExtent, add projection check in mapExt…
yhy0217 Oct 24, 2023
2fee5e2
Merge branch 'map-extent' of https://github.com/Maps4HTML/Web-Map-Cus…
yhy0217 Oct 24, 2023
bc4515b
clean up the templatedTileLayer._container when the templatedTileLaye…
yhy0217 Oct 25, 2023
317ebc7
Add rejection to map-extent, map-input in the case of the element being
Oct 25, 2023
bef10a9
Make it so that createLayerControlHTML works unconditionally, was
Oct 25, 2023
0c3f394
Enable <select> as a control in <map-extent>, which will break keyboard
Oct 25, 2023
6f185c5
get layer and extent layer control disabled properly + move over code…
AliyanH Oct 26, 2023
2d9bbd3
update Gruntfile
AliyanH Oct 26, 2023
12d677a
grouping the radio buttons of styles in layerControl based on an uniq…
yhy0217 Oct 26, 2023
85c1f2f
invoke mapExtent.handlechange when the map projection is changed to m…
yhy0217 Oct 26, 2023
25543c5
Workaround leaflet bug when changing map.options.crs #2553
prushforth Oct 26, 2023
6d9cdee
initial map-input setup
prushforth May 24, 2023
7d8acda
implement Classes for different types of map-input types
prushforth May 26, 2023
9951ddd
Update map-input implementation + Add support for tilematrix type=loc…
AliyanH May 31, 2023
68bf20f
initial map-link setup
prushforth Jun 8, 2023
d9ff457
Make map-input.connectedCallback async, await on extent.whenReady()
prushforth Sep 26, 2023
6cdc58f
Update version to 0.12.0 in package.json
Sep 27, 2023
afa0572
WIP on migrating extent initialization from MapMLLayer to map-extent.js
Oct 3, 2023
8e1085f
WIP on migrating extent initialization from MapMLLayer to map-extent.js
Oct 3, 2023
b358e1a
Initial working migration of map-extent initialization from MapMLLayer
Oct 4, 2023
3a12e9b
WIP updating and adding and removing layer control extent HTML
Oct 4, 2023
0ddf09f
Add comment re: current problem
Oct 4, 2023
d9680bf
WIP on map-extent hidden API
Oct 5, 2023
a197640
Initial working hidden API for map-extent
prushforth Oct 5, 2023
fe9335a
WIP on map-extent Get checkbox working via API map-extent.checked. Ch…
prushforth Oct 5, 2023
f56f695
Fix TemplatedFeaturesLayer checking/unchecking behaviour.
Oct 6, 2023
8b65874
Set 'Sub-layer' as default label attribute, add to options messages
prushforth Oct 10, 2023
b4bd73a
Move/ refactor MapMLLayer._setLayerElExtent into layer.js layer-.extent
prushforth Oct 10, 2023
5bf93ac
Fix bug in _calculateExtent, add whenReady() to layer.zoomTo
prushforth Oct 10, 2023
926e114
WIP get tests configured with new map-extent attributes.
prushforth Oct 11, 2023
fe58ee6
Fix a test done with map-extent hidden attribute implemented via CE
prushforth Oct 11, 2023
1917320
Make opacity work the same in map-extent as it does in layer. This is
Oct 11, 2023
278d3e8
Make layer-.extent (layer-._calculateExtent()) memoized
AliyanH Oct 11, 2023
da36f03
Get map-extent label API working
AliyanH Oct 11, 2023
2082af0
WIP fix/refactor query map-extents
AliyanH Oct 11, 2023
a0985be
avoid remote map-feature (in mapml) triggering MapFeature connectedCa…
yhy0217 Oct 12, 2023
e05ef43
Fix remote queryable layer with hidden extent not queryable.
prushforth Oct 12, 2023
ff8468e
Re-write AnnounceMovement.js totalBounds event handler to use
prushforth Oct 12, 2023
99b6dfc
create layer-.whenElemsReady method to check if the children elems of…
yhy0217 Oct 13, 2023
dc21be3
WIP on debugMode, totalLayerBounds, AnnounceMovement
Oct 13, 2023
a9e5c2a
Get debugMode.test.js working
Oct 13, 2023
011ea3d
featureIndexOverlayResults needs to be in slowMo to work reliably
prushforth Oct 16, 2023
663fb8f
Refactor layer.js._calculateExtent into
Oct 17, 2023
f63643c
WIP on multiple extents test semantics. Also, see todo file for disc…
prushforth Oct 17, 2023
862bfc4
Upgrade playwright to 1.39.0
Oct 19, 2023
ec97a8c
get rid of layerControl._validateInput, make layer- and map-extent el…
yhy0217 Oct 19, 2023
4f4c615
WIP: refactor to get rid of _properties._mapExtents, make layer- and …
yhy0217 Oct 23, 2023
95daa8c
add event listener on layer- to listen to layer- checked property cha…
yhy0217 Oct 24, 2023
fec1145
remove trailing '/' from from xmlns links
AliyanH Oct 24, 2023
53e3e16
get rid of MapMLLayer._validateExtent, add projection check in mapExt…
yhy0217 Oct 24, 2023
971afc4
Init checkbox defaultChecked for map-extent, layer-
prushforth Oct 24, 2023
f8525f4
clean up the templatedTileLayer._container when the templatedTileLaye…
yhy0217 Oct 25, 2023
56f7967
Add rejection to map-extent, map-input in the case of the element being
Oct 25, 2023
1796aab
Make it so that createLayerControlHTML works unconditionally, was
Oct 25, 2023
f719e38
Enable <select> as a control in <map-extent>, which will break keyboard
Oct 25, 2023
57ba9a8
get layer and extent layer control disabled properly + move over code…
AliyanH Oct 26, 2023
3dcad6a
update Gruntfile
AliyanH Oct 26, 2023
b8667c8
grouping the radio buttons of styles in layerControl based on an uniq…
yhy0217 Oct 26, 2023
4581cf8
invoke mapExtent.handlechange when the map projection is changed to m…
yhy0217 Oct 26, 2023
4fc7afe
Workaround leaflet bug when changing map.options.crs #2553
prushforth Oct 26, 2023
22c3564
Workaround leaflet bug when changing map.options.crs #2553 part deux
prushforth Oct 26, 2023
6499590
Merge branch 'map-extent' of https://github.com/Maps4HTML/Web-Map-Cus…
yhy0217 Oct 27, 2023
ebe1e6b
Make opacity implementation the same for both layer- and map-extent
Oct 27, 2023
d2fa174
add the setTimeout for the layer-._validateDisable back, to make sure…
yhy0217 Oct 27, 2023
5aa98ba
Merge branch 'map-extent' of https://github.com/Maps4HTML/Web-Map-Cus…
yhy0217 Oct 27, 2023
b872eb7
Fix merge error
Oct 27, 2023
31a701c
Sync mapml-viewer -> web-map.js
Oct 27, 2023
56cadcb
Enable layer-.whenReady to handle fetch errors without waiting for the
Oct 27, 2023
34943ad
Get tests working
Oct 27, 2023
1468464
Remove .only from some tests preventing full suite from running
Oct 27, 2023
5137200
sync multipleExtents tests with PR
AliyanH Oct 27, 2023
924ac86
Fix markup in mapSpan.html
prushforth Oct 30, 2023
82f2fa8
WIP: fix failing test; migrate map-meta[name] from remote mapml to th…
yhy0217 Oct 30, 2023
54af929
fix the typo from map-meta[name=projection] to map-meta[name=zoom]; d…
yhy0217 Oct 30, 2023
ff83d12
add settimeout in debugoverlay._addbounds to delay the function call …
yhy0217 Oct 30, 2023
328e36d
sync mapml-viewer test with web-map
AliyanH Oct 30, 2023
cac50b3
add constants.js to dist and import it in map-extent.js, remove unuse…
yhy0217 Oct 30, 2023
8a65876
Projection change test when following link to layer with default bounds
prushforth Oct 30, 2023
65705ed
make the minzoom and maxzoom of staticTileLayer read from map-meta in…
yhy0217 Oct 31, 2023
8ca68f1
fix CI test file formatting, enable CI
yhy0217 Oct 31, 2023
5259685
Update ci-testing with trailing space to try to get it working. Upda…
Oct 31, 2023
a3fea83
Update yaml file from known good revision
Oct 31, 2023
ec4710e
Add whenReady().then().catch() blocks to layer-.attributeChangedCallback
Oct 31, 2023
ebc04a8
Set --workers=1 for playwright testing, be kind to github actions
Oct 31, 2023
b2024f7
add slowmo to the debugmode.test
yhy0217 Oct 31, 2023
9da442b
Merge branch 'map-extent' of https://github.com/Maps4HTML/Web-Map-Cus…
yhy0217 Oct 31, 2023
1ab4466
add slowmo to the history.test
yhy0217 Oct 31, 2023
b4961c8
add slowmo to a few tests to get GitHub CI testing pass
yhy0217 Oct 31, 2023
ff77a59
change the returned format of the zoom getter of mapmlviewer from Str…
yhy0217 Nov 1, 2023
728790d
change map lat, lon, width and height getters to return a Number inst…
yhy0217 Nov 1, 2023
c892fba
add waitfortimeout for flaky tests to pass GitHub CI testing
yhy0217 Nov 1, 2023
e06eeff
Return number for layer-, map-extent.opacity,
Nov 2, 2023
fa764b5
move dist to right place for grunt web-map-doc
AliyanH Nov 2, 2023
b6991c3
Bundle everything possible into mapml.js, use M. to access global sym…
Nov 2, 2023
a4ff429
cleanup - remove comments that are now irrelevant + remove commented …
AliyanH Nov 3, 2023
4ae8f82
initialize this._opacity of layer- and map-extent with the attribute …
yhy0217 Nov 3, 2023
fd68b1a
Add tests for map-extent attribute api. Fix bug in same.
prushforth Nov 3, 2023
75b4b5b
Add test for template feature being disabled when going out of bounds
AliyanH Nov 3, 2023
faa584a
Change class on opacity details/summary for map-extent layer control
prushforth Nov 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ module.exports = function(grunt) {
'dist/mapml.js': ['<%= rollup.main.dest %>'],
'dist/web-map.js': ['src/web-map.js'],
'dist/mapml-viewer.js': ['src/mapml-viewer.js'],
'dist/DOMTokenList.js': ['src/mapml/utils/DOMTokenList.js'],
'dist/map-caption.js': ['src/map-caption.js'],
'dist/map-feature.js': ['src/map-feature.js'],
'dist/map-extent.js': ['src/map-extent.js'],
'dist/map-input.js': ['src/map-input.js'],
'dist/map-link.js': ['src/map-link.js'],
'dist/map-area.js': ['src/map-area.js'],
'dist/layer.js': ['src/layer.js'],
'dist/leaflet.js': ['dist/leaflet-src.js',
Expand Down Expand Up @@ -159,7 +160,7 @@ module.exports = function(grunt) {
{
expand: true,
src: ['dist/*'],
dest: '../web-map-doc'
dest: '../web-map-doc/static'
}
]
}
Expand Down
114 changes: 61 additions & 53 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/* Responsive map. */
max-width: 100%;

/* Full viewport. */
/* Full viewport. */
width: 100%;
height: 100%;

Expand Down Expand Up @@ -72,56 +72,64 @@
</noscript>
</head>
<body>
<mapml-viewer projection="OSMTILE" zoom="10" lon="-75.7" lat="45.4" controls="">
<layer- label="OpenStreetMap" src="https://maps4html.org/web-map-doc/demo/data/osm.mapml" checked=""></layer->

<layer- label="Polygon" checked>
<map-meta name="projection" content="OSMTILE"></map-meta>
<map-meta name="zoom" content="min=10,max=11"></map-meta>
<map-feature zoom="10">
<map-featurecaption>Click me!</map-featurecaption>
<!-- Setting the geometry coordinates to gcrs, as the default is pcrs -->
<map-geometry>
<map-a href="#15, -75.699, 45.420">
<map-polygon class="polygon">
<map-coordinates>-75.8242035 45.3526278 -75.6793213 45.4572409 -75.5680847 45.4692806 -75.6092834 45.4215881 -75.5756378 45.3810901 -75.7946777 45.3120804</map-coordinates>
</map-polygon>
</map-a>
</map-geometry>
<map-properties></map-properties>
</map-feature>
</layer->

<layer- label="Points" checked>
<map-meta name="projection" content="OSMTILE"></map-meta>
<map-meta name="zoom" content="min=14,max=24"></map-meta>
<map-feature>
<map-featurecaption>Point 1</map-featurecaption>
<map-geometry>
<map-point class="point">
<map-coordinates>-75.6978285 45.4202251</map-coordinates>
</map-point>
</map-geometry>
<map-properties></map-properties>
</map-feature>
<map-feature>
<map-featurecaption>Point 2</map-featurecaption>
<map-geometry>
<map-point class="point">
<map-coordinates>-75.7002854 45.4199465</map-coordinates>
</map-point>
</map-geometry>
<map-properties></map-properties>
</map-feature>
<map-feature>
<map-featurecaption>point 3</map-featurecaption>
<map-geometry>
<map-point class="point">
<map-coordinates>-75.6984723 45.4179207</map-coordinates>
</map-point>
</map-geometry>
<map-properties></map-properties>
</map-feature>
</layer->
</mapml-viewer> </body>

<mapml-viewer projection="OSMTILE" zoom="14" lat="45.406314" lon="-75.6883335" controls controlslist="geolocation">
<layer- data-testid="osm-layer" label="OpenStreetMap" checked >
<map-extent data-testid="osm-extent" units="OSMTILE" label="foo" checked="checked" >
<map-input name="z" type="zoom" value="18" min="0" max="18"></map-input>
<map-input name="x" type="location" units="tilematrix" axis="column" min="0" max="262144"></map-input>
<map-input name="y" type="location" units="tilematrix" axis="row" min="0" max="262144"></map-input>
<map-link rel="tile" tref="https://tile.openstreetmap.org/{z}/{x}/{y}.png"></map-link>
</map-extent>
</layer->
<!-- <layer- data-testid="rest-layer" id="restaurant" label="Mexican restaurants" src="../shared/restaurants/mexican.mapml" checked>-->
<!-- <map-meta name="cs" content="gcrs" ></map-meta>
<map-meta name="extent" content="top-left-easting=-8433179, top-left-northing=5689316, bottom-right-easting=-8420968, bottom-right-northing=5683139"></map-meta>
<map-feature zoom="18" id="restaurant_polygon.2" class="restaurant_polygon">
<map-featurecaption>Banditos</map-featurecaption>
<map-geometry>
<map-point>
<map-coordinates>-75.689609 45.405803</map-coordinates>
</map-point>
</map-geometry>
<map-properties>
<table>
<thead>
<tr>
<th role="columnheader" scope="col">Property name</th>
<th role="columnheader" scope="col">Property value</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">addr_house</th>
<td itemprop="addr_house">683</td>
</tr>
<tr>
<th scope="row">addr_stree</th>
<td itemprop="addr_stree">Bank Street</td>
</tr>
<tr>
<th scope="row">amenity</th>
<td itemprop="amenity">restaurant</td>
</tr>
<tr>
<th scope="row">building</th>
<td itemprop="building">commercial</td>
</tr>
<tr>
<th scope="row">name</th>
<td itemprop="name">Banditos</td>
</tr>
<tr>
<th scope="row">cuisine</th>
<td itemprop="cuisine">mexican</td>
</tr>
</tbody>
</table>
</map-properties>
</map-feature>-->
</layer->
</mapml-viewer>
</body>
</html>
63 changes: 30 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@maps4html/web-map-custom-element",
"version": "0.11.0",
"version": "0.12.0",
"description": "web-map customized built-in HTML <map> or custom <mapml-viewer>",
"keywords": [
"mapml-viewer",
Expand Down Expand Up @@ -32,10 +32,11 @@
}
],
"scripts": {
"test": "npx playwright test --retries=3",
"test": "npx playwright test --retries=3 --workers=1",
"jest": "jest --verbose --noStackTrace"
},
"devDependencies": {
"@playwright/test": "^1.39.0",
"diff": "^5.1.0",
"express": "^4.17.1",
"grunt": "^1.4.0",
Expand All @@ -56,8 +57,7 @@
"leaflet": "^1.9.4",
"leaflet.locatecontrol": "^0.79.0",
"path": "^0.12.7",
"@playwright/test": "^1.35.1",
"playwright": "^1.35.1",
"playwright": "^1.39.0",
"proj4": "^2.6.2",
"proj4leaflet": "^1.0.2",
"rollup": "^2.23.1"
Expand Down
Loading