Skip to content

Commit c445dea

Browse files
author
Peter Rushforth
committed
Add map-tile element
Set up index.html with local geoserver spearfish layer to test map-tile Change getElementsByTagName to querySelectorAll - probably will cause test failures and needs to be thought out and refactored once map-tile is complete WIP on map-tile, TemplatedFeaturesOrTilesLayerGroup, map-link WIP on map-tile, TemplatedFeaturesOrTilesLayerGroup, map-link remove redundant method from TemplatedFeaturesOrTilesLayerGroup WIP on map-tile, TemplatedFeaturesOrTilesLayerGroup, map-link remove redundant method from TemplatedFeaturesOrTilesLayerGroup Comment out CI Hopefully disable CI by temporarily removing ci-testing.yml Add templates parameter to TemplatedFeaturesOrTilesLayerGroup (TFOTLG) Add provisional / draft implementation of moveend handler for TFOTLG, based on simplified version of that from TemplatedFeaturesLayer source Exclude handling of <map-feature> for the moment to get things working incrementally, maybe. Add a hard-coded isVisible() implementation that returns true for the moment Add some code to onAdd and onRemove Layer method overrides Add provisional _setUpTemplateVars function Get rendering of map-tile kinda working. Save some work from today hopefully without breaking stuff Delete MapFeatureLayerGroup.js - only need FeatureLayer.js I hope Keep similar code between map-feature.js and map-tile.js in sync Fix missed isFirst / getPrevious method reconciliation between map-tile and map-feature
1 parent aee7323 commit c445dea

16 files changed

+1723
-574
lines changed

.github/workflows/ci-testing.yml

-25
This file was deleted.

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
/test-results/
1212
.idea/
1313
*.iml
14-
test.html
14+
test.html
15+
**/.claude/settings.local.json

CLAUDE.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Build and Test Commands
6+
- Build project: `grunt default`
7+
- Format and lint: `grunt format`
8+
- Run tests: `npx playwright test`
9+
- Run single test: `npx playwright test test/e2e/path/to/test.test.js`
10+
- Start test server: `node test/server.js`
11+
- Test with specific browser: `npx playwright test --project=chromium`
12+
13+
## Code Style Guidelines
14+
- JavaScript: ES6+, esversion 11
15+
- Formatting: Prettier with singleQuote: true, trailingComma: "none"
16+
- Testing: Playwright for E2E tests, Jest for unit tests
17+
- Style the code like existing files, following established patterns
18+
- Use jshint for linting
19+
- Components use custom HTML elements pattern
20+
- Prefer absolute paths over relative paths
21+
- MapML is a custom extension of HTML for maps
22+
- Prefer async/await in test files
23+
- Error handling should follow existing patterns in similar code
24+
- Include meaningful test descriptions

example-tiles-and-features.mapml.xml

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
<mapml- xmlns="http://www.w3.org/1999/xhtml">
2+
<map-head>
3+
<map-title>sfdem, streams, roads, restricted, archsites, bugsites</map-title>
4+
<map-meta charset="UTF-8" />
5+
<map-meta content="text/mapml" http-equiv="Content-Type" />
6+
<map-meta name="extent"
7+
content="top-left-easting=-11562869.44,top-left-northing=5543411.27,bottom-right-easting=-11535965.66,bottom-right-northing=5522923.37" />
8+
<map-meta name="cs" content="pcrs" />
9+
<map-meta name="projection" content="OSMTILE" />
10+
<map-style>.bbox {display:none} .capitals-r1-s1{r:48.0; stroke-opacity:1.0;
11+
stroke-dashoffset:0; well-known-name:circle; stroke-width:2.0; opacity:1.0;
12+
fill:#FFFFFF; fill-opacity:1.0; stroke:#000000; stroke-linecap:butt}</map-style>
13+
</map-head>
14+
<map-body>
15+
<map-tile col="3472" row="10452" zoom="14"
16+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1545048750585938E7%2C5527925.884814452%2C-1.1542602765681153E7%2C5530371.869719239&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
17+
<map-tile col="3472" row="10453" zoom="14"
18+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1545048750585938E7%2C5530371.869719239%2C-1.1542602765681153E7%2C5532817.854624024&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
19+
<map-tile col="3472" row="10454" zoom="14"
20+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1545048750585938E7%2C5532817.854624024%2C-1.1542602765681153E7%2C5535263.839528808&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
21+
<map-tile col="3472" row="10455" zoom="14"
22+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1545048750585938E7%2C5535263.839528808%2C-1.1542602765681153E7%2C5537709.824433593&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
23+
<map-tile col="3473" row="10452" zoom="14"
24+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1542602765681153E7%2C5527925.884814452%2C-1.1540156780776367E7%2C5530371.869719239&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
25+
<map-tile col="3473" row="10453" zoom="14"
26+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1542602765681153E7%2C5530371.869719239%2C-1.1540156780776367E7%2C5532817.854624024&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
27+
<map-tile col="3473" row="10454" zoom="14"
28+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1542602765681153E7%2C5532817.854624024%2C-1.1540156780776367E7%2C5535263.839528808&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
29+
<map-tile col="3473" row="10455" zoom="14"
30+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1542602765681153E7%2C5535263.839528808%2C-1.1540156780776367E7%2C5537709.824433593&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
31+
<map-tile col="3474" row="10452" zoom="14"
32+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1540156780776367E7%2C5527925.884814452%2C-1.1537710795871582E7%2C5530371.869719239&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
33+
<map-tile col="3474" row="10453" zoom="14"
34+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1540156780776367E7%2C5530371.869719239%2C-1.1537710795871582E7%2C5532817.854624024&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
35+
<map-tile col="3474" row="10454" zoom="14"
36+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1540156780776367E7%2C5532817.854624024%2C-1.1537710795871582E7%2C5535263.839528808&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
37+
<map-tile col="3474" row="10455" zoom="14"
38+
src="http://localhost:8080/geoserver/wms?LAYERS=sf%3Asfdem&amp;BBOX=-1.1540156780776367E7%2C5535263.839528808%2C-1.1537710795871582E7%2C5537709.824433593&amp;HEIGHT=256&amp;WIDTH=256&amp;SRS=MapML%3AOSMTILE&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.3.0&amp;Language=en" />
39+
<map-feature id="streams.7" class="simple_streams-r1-s1">
40+
<map-geometry>
41+
<map-linestring>
42+
<map-coordinates>-11538847.8 5531019.6 -11538860.6 5531045.3 -11538871.2
43+
5531077.4 -11538896 5531123.7 -11538899.6 5531138 -11538917.3 5531170.1
44+
-11539009.6 5531252.1 -11539119.7 5531316.3 -11539254.6 5531433.9
45+
-11539300.8 5531483.8 -11539332.7 5531548 -11539329.1 5531637.1 -11539311.4
46+
5531683.4 -11539279.4 5531701.2 -11539130.2 5531722.6 -11539073.4 5531765.3
47+
-11539041.4 5531843.7 -11538995.2 5531847.2 -11538959.7 5531829.4
48+
-11538874.4 5531832.9 -11538847.8 5531846.3</map-coordinates>
49+
</map-linestring>
50+
</map-geometry>
51+
</map-feature>
52+
<map-feature id="streams.8" class="simple_streams-r1-s1">
53+
<map-geometry>
54+
<map-linestring>
55+
<map-coordinates>-11543278.6 5529563.7 -11543275 5529602.9 -11543257.3 5529642
56+
-11543236 5529656.3 -11543157.8 5529770.3 -11543125.9 5529852.3 -11543111.7
57+
5529941.4 -11543108.2 5530012.6 -11543093.9 5530119.5 -11543062 5530240.7
58+
-11543026.5 5530294.1 -11543005.2 5530301.3 -11542969.7 5530297.7
59+
-11542937.7 5530272.8 -11542905.7 5530226.4 -11542891.5 5530176.6
60+
-11542838.3 5530098.2 -11542763.7 5530101.7 -11542593.2 5530190.8
61+
-11542458.3 5530201.5 -11542397.9 5530233.6 -11542316.2 5530247.8
62+
-11542270.1 5530369 -11542263 5530415.3 -11542220.3 5530483 -11542170.6
63+
5530500.8 -11542081.8 5530486.6 -11542039.2 5530461.6 -11541978.8 5530401
64+
-11541964.7 5530369 -11541946.9 5530351.2 -11541922 5530301.3 -11541875.9
65+
5530247.8 -11541858.1 5530240.7 -11541801.3 5530247.8 -11541765.8 5530287
66+
-11541662.8 5530426 -11541606 5530486.5 -11541531.4 5530497.2 -11541439
67+
5530458 -11541353.8 5530404.5 -11541197.6 5530265.5 -11541140.8 5530197.8
68+
-11541101.7 5530180 -11541041.4 5530183.6 -11540956.1 5530229.9 -11540856.7
69+
5530222.7 -11540743.1 5530190.6 -11540672 5530204.9 -11540604.5 5530304.6
70+
-11540579.7 5530318.9 -11540448.3 5530329.6 -11540224.5 5530415 -11540157
71+
5530429.2 -11540061.1 5530429.2 -11539951.1 5530350.8 -11539890.7 5530322.3
72+
-11539787.8 5530233.2 -11539752.3 5530204.6 -11539667 5530204.6 -11539599.5
73+
5530222.4 -11539535.6 5530265.1 -11539496.5 5530318.6 -11539471.7 5530375.6
74+
-11539425.4 5530518.1 -11539393.4 5530635.7 -11539372.1 5530678.5
75+
-11539350.8 5530710.5 -11539283.3 5530739 -11539166.1 5530739 -11539080.9
76+
5530706.9 -11539041.8 5530660.5 -11539020.6 5530599.9 -11538985.1 5530557.1
77+
-11538931.8 5530550 -11538896.3 5530560.7 -11538847.8 5530609.3</map-coordinates>
78+
</map-linestring>
79+
</map-geometry>
80+
</map-feature>
81+
<map-feature id="streams.9" class="simple_streams-r1-s1">
82+
<map-geometry>
83+
<map-linestring>
84+
<map-coordinates>-11543097.4 5528690.3 -11543097.4 5528740.6 -11543118.7
85+
5528765.5 -11543186.2 5528797.6 -11543232.4 5528897.4 -11543235.9 5528918.7
86+
-11543250.1 5528936.6 -11543260.8 5528965.1 -11543267.9 5529072 -11543243
87+
5529153.9 -11543161.4 5529275 -11543129.4 5529307.1 -11543129.4 5529381.9
88+
-11543211.1 5529471 -11543260.8 5529513.8 -11543278.6 5529549.4 -11543278.6
89+
5529563.7</map-coordinates>
90+
</map-linestring>
91+
</map-geometry>
92+
</map-feature>
93+
<map-feature id="roads.526" class="simple_roads-r1-s1">
94+
<map-geometry>
95+
<map-linestring>
96+
<map-coordinates>-1.154197545486741E7 5528690.2558668 -1.15419842E7 5528702.6
97+
-1.15420779E7 5528948.8 -1.15421423E7 5529066.4 -1.15423138E7 5529238.3
98+
-1.15423223E7 5529233.2 -1.15424015E7 5529256.6 -1.15424412E7 5529352.7
99+
-1.15424537E7 5529429.8</map-coordinates>
100+
</map-linestring>
101+
</map-geometry>
102+
</map-feature>
103+
<map-feature id="roads.528" class="simple_roads-r1-s1">
104+
<map-geometry>
105+
<map-linestring>
106+
<map-coordinates>-1.15432167E7 5529271.1 -1.1543219E7 5529347.4 -1.15432537E7
107+
5529412.6 -1.15433427E7 5529536.3 -1.15433579E7 5529585.2 -1.1543356E7
108+
5529639.1 -1.1543219E7 5529868.4 -1.15432153E7 5529937.8 -1.15432021E7
109+
5530059.4 -1.15431755E7 5530144.2 -1.15431196E7 5530299.9 -1.15431364E7
110+
5530354 -1.15431942E7 5530403 -1.15433533E7 5530481.5 -1.15434197E7
111+
5530475.7 -1.15435152E7 5530461.4 -1.15435587E7 5530450.4 -1.15435759E7
112+
5530410.2 -1.1543599E7 5530374.3 -1.15436169E7 5530375.2 -1.15436371E7
113+
5530437.8 -1.15436496E7 5530524.4 -1.15436859E7 5530638.5 -1.15436064E7
114+
5530707.6 -1.15436037E7 5530757.3 -1.1543651E7 5530900.6 -1.154373E7
115+
5530962.5 -1.15437836E7 5530985 -1.15438474E7 5531032.3</map-coordinates>
116+
</map-linestring>
117+
</map-geometry>
118+
</map-feature>
119+
<map-feature id="roads.529" class="simple_roads-r1-s1">
120+
<map-geometry>
121+
<map-linestring>
122+
<map-coordinates>-1.15438474E7 5531032.3 -1.15438747E7 5531008.4
123+
-1.154394996991142E7 5530977.68753614</map-coordinates>
124+
</map-linestring>
125+
</map-geometry>
126+
</map-feature>
127+
</map-body>
128+
</mapml->

0 commit comments

Comments
 (0)