diff --git a/api/pwa/file-handling/src/main-app.js b/api/pwa/file-handling/src/main-app.js index 0fe98799..887c0541 100644 --- a/api/pwa/file-handling/src/main-app.js +++ b/api/pwa/file-handling/src/main-app.js @@ -134,9 +134,11 @@ mapml-viewer { - + + + @@ -145,6 +147,7 @@ mapml-viewer { + Parchment icons created by Freepik - Flaticon diff --git a/change-projection/default-projection/index.html b/change-projection/default-projection/index.html index f3309082..ee26cfe1 100644 --- a/change-projection/default-projection/index.html +++ b/change-projection/default-projection/index.html @@ -8,41 +8,46 @@ the viewer projection from OSMTILE to CBMTILE. --> - + - + Topo base + + - + - + - - - - - - - + + + + + + + + Copied OSMTILE pcrs location diff --git a/custom-projections/Atlas-of-Canada/atlas.mapml b/custom-projections/Atlas-of-Canada/atlas.mapml index 57bed8c1..934afca3 100644 --- a/custom-projections/Atlas-of-Canada/atlas.mapml +++ b/custom-projections/Atlas-of-Canada/atlas.mapml @@ -6,6 +6,8 @@ + + - + + + + diff --git a/inputs/map-select/index.html b/inputs/map-select/index.html index 05ce6b3c..ba635709 100644 --- a/inputs/map-select/index.html +++ b/inputs/map-select/index.html @@ -6,11 +6,14 @@ <map-select> / <map-option> + - + Territorial Evolution + + diff --git a/linking/features/canada.mapml b/linking/features/canada.mapml index 897a1e78..d46656bd 100644 --- a/linking/features/canada.mapml +++ b/linking/features/canada.mapml @@ -503,7 +503,7 @@ Champlain unit - Ontario Local Health Integration Network - + -88.86611751473573 56.84777124835767 -88.66044550309192 56.69874773338556 -87.97263948083796 56.46240508707815 -87.62982230429728 56.09591953184301 -87.36462652676312 55.96018255462204 -85.90281607438804 55.65543231713965 -85.12606289899212 55.333571626053725 -85.10906627137776 55.260424482659424 -83.8864871785856 55.29498377735435 -83.63054753719426 55.21208818547163 -83.692788505751 55.26791185309981 -83.33874815321737 55.19860930869381 -82.95891914996425 55.221966475209356 -82.80332153646594 55.128260400590925 -82.68020601515953 55.18010790152921 -82.31109789167684 55.05439491519922 -82.34826594535399 55.15921017882501 -82.25317260156356 55.10947542848784 -82.1978144992243 54.80379502335311 -82.45681932231398 54.20143712295598 -82.126323455303 53.81981695541309 -82.26338059887293 53.58880024336057 -82.11249195027578 53.27394823063812 -82.25971581808888 53.171358525473885 -82.30472432147002 52.95205278687007 -81.54570907876732 52.44318134095798 -81.56052650231075 52.28626798982384 -81.38454736120839 52.11608152787475 -81.08045352775626 52.05830368139473 -80.68854141363998 51.84614406173554 -80.39254169510843 51.34369175300584 -79.80094306113783 51.1568782212358 -79.68131500759974 51.25270430844722 -79.73486315806926 51.370861646964315 -79.51584871328652 51.46067759922485 -79.51048602213025 47.54358242292287 -79.58687808417284 47.43311495905236 -79.42684265019551 47.25006924017574 -79.4349859404332 47.0842299419788 -78.96930973940026 46.52883607850069 -78.6972725567213 46.319741542682785 -77.56608271061066 46.15922059108833 -76.98768333529004 45.78663475720615 -76.92757515408539 45.89225487824191 -76.78016160645815 45.872371978683894 -76.66001014306126 45.560633146803035 -76.36595599943338 45.45783178608833 -76.08987718684452 45.513852445394846 -75.81782532552353 45.37269870934803 -74.9367749527046 45.64499471381664 -74.381266998499 45.56611605949373 -74.4719112791711 45.3027342105846 -74.38893235274847 45.16862155461909 -74.61553242962836 45.035896957073874 -74.73439323314958 45.01064288376615 -74.83768003910228 45.03277398824502 -74.98304489621475 45.01383109194813 -75.82775130523666 44.513698850091465 -75.93756702722621 44.37548570092765 -76.69627738016167 44.22242863346225 -77.02079076290609 44.05078762462264 -77.07634485535667 44.08481360216204 -76.88593243462931 44.17486200073201 -77.06336859623764 44.10388342457511 -77.01229683690805 44.20152400783681 -77.38482547481964 44.16108536067046 -77.7481525504485 44.01343346078872 -77.70374719424393 43.988870709488495 -78.9352025408259 43.851188192363054 -79.57649971956737 43.54817598873062 -79.61477617960743 43.557865768375706 -79.64147219712565 43.55059572548058 -79.65060447855494 43.53967387510189 -79.65778225235805 43.55199495514051 -79.71627676855194 43.58699932405454 -79.71213800922509 43.60797718199507 -79.73722677847138 43.633027122992694 -79.73812492302697 43.63335218159062 -79.74024127923943 43.63292531580455 -79.74582889573912 43.628907969503025 -79.76782030737026 43.64218492512126 -79.78610497464265 43.64726071996774 -79.84075715602762 43.648800505150675 -79.85504475659097 43.64407335482438 -79.8787981652261 43.65755369666846 -79.92712875631733 43.6688213033339 -79.92566753527393 43.69003089020494 -79.93694500619634 43.712601068284805 -79.92654578216958 43.728431736461296 -79.91979308974136 43.759413375811675 -79.92943466273363 43.79762614683332 -79.91997711898648 43.75954116421783 -79.93710284330228 43.71280061841436 -79.92820179401393 43.66895843644162 -79.854938823766 43.64377517500512 -79.78582528970908 43.646987633059986 -79.74566120017596 43.62862700156487 -79.7377093806609 43.63306845187903 -79.7165024333166 43.58629055336391 -79.65076794706043 43.539558747397 -79.58126387693852 43.54717211348997 -79.80031375932684 43.31993696186159 -79.76188069086396 43.256351719019996 -79.34353272480699 43.180615510936725 -79.06216474415444 43.257675428634414 -79.07912566456214 43.07529639955695 -78.93191932963653 42.88413535363372 -80.2159107976428 42.783406574075 -80.45464658767247 42.61420959221497 -80.04279026200086 42.54908164187133 -80.10252707524464 42.54095564721681 -80.89240830330604 42.658720205775374 -81.32367147821117 42.650442561712815 -81.80372296865127 42.392514661912365 -81.85178726627053 42.25581580706176 -81.87321184654566 42.2542587373258 -81.90557843019303 42.26006886703544 -81.84792310695364 42.32116581836668 -81.87517485862071 42.334794353057596 -81.90876589057709 42.25576574762567 -82.09395836832789 42.24725004486921 -82.4745022278032 42.07273693304798 -82.50568811803484 41.90314753894358 -82.56036754306866 42.0215536484357 -82.9240461177651 41.98080916706754 -83.10856850802305 42.04743561928136 -83.10866046518039 42.257224328787835 -82.94002184556267 42.34306343451186 -82.72639489054107 42.29665109741581 -82.45931818470496 42.307971632372976 -82.419456870904 42.49749432658261 -82.62590512527245 42.53517671019313 -82.58089481836919 42.55018716566993 -82.50927482192121 42.62206347207803 -82.42189949191771 42.99868810943727 -82.17053048317513 43.05908566529503 -81.72039651493847 43.36777613105786 -81.75888995156237 44.073722235849445 -81.27081637287665 44.63107946973596 -81.36871772974958 45.000071281917315 -81.43675534880086 44.97131924035631 -81.57561656299801 45.19206091120201 -81.72955882941528 45.22134564698504 -81.28972347456912 45.245295211505315 -81.33600617324296 45.14184781255829 -81.22448116673566 44.95952801599558 -81.081670460995 44.89166398838723 -80.96020819413205 44.95666008427828 -81.13985415950445 44.747248057660364 -80.90682080329137 44.795682973544984 -80.94117788814455 44.57784722082212 -80.795618991157 44.70426356980024 -80.64634439569411 44.72185862283649 -80.59042349406211 44.61023942144748 -80.10109429458525 44.4705511581104 -79.97920575172223 44.667655666570724 -80.12054043661128 44.812985810330595 -79.95121880413645 44.867027659533164 -79.9532954682525 44.765627858933826 -79.8851582081818 44.812325781624146 -79.84871593623207 44.729368349995745 -79.69992262835363 44.757145775381204 -79.8205409829715 44.856624517373646 -79.76795162704708 44.872750165320106 -79.77762566462764 44.9168923078272 -79.92523786511954 44.93325741426557 -80.0105828127797 45.02816220690295 -79.94308371588649 45.06150341301781 -80.09999790505736 45.08578451870778 -79.92304704158177 45.08213740665123 -80.11161331696407 45.11356490691778 -80.01838836045096 45.11283763823572 -79.97087536059917 45.16260390164239 -80.13424233290363 45.2001098548165 -80.04077426137137 45.31290832744523 -80.19648112083813 45.23513979483432 -80.16864400961089 45.33639626260096 -80.38685743942337 45.439431141700524 -80.3785216285249 45.595773892712806 -80.41580227406043 45.62467731602491 -80.5151722988629 45.56264929803173 -80.73320302650637 45.948129941085 -80.79757806740437 45.89364722233601 -80.80632950317697 45.956872655295875 -80.8506896922355 45.91564518334983 -80.97996659991034 45.972551686310474 -81.14886967514258 45.91963295525976 -81.15407385823467 46.00137677576635 -81.41927992867879 45.99453730122139 -81.52163269945865 45.97223546533552 -81.48838748401586 46.01167855265563 -81.54869138363442 46.00013531268841 -81.53352260033175 45.99444808686498 -81.66633790733759 45.939775378469136 -81.68949269635857 45.93963803004159 -81.55609445794624 45.999560707395105 -81.67094532462701 46.00941156967929 -81.4766550914095 46.05034839973215 -81.71652372243842 46.0080458516466 -81.53163521657586 46.06027619717496 -81.63257785024224 46.09277497817515 -81.54968247695992 46.0758062549226 -81.55201186602258 46.094119479126725 -81.66110733915399 46.114862023845184 -81.77307030981073 46.002376106517886 -81.71552644926096 46.10564778277852 -82.14836326964281 46.099925791662976 -82.45135767758582 46.20093616061557 -83.04727397158662 46.16743297374523 -83.9197668407632 46.34514354920657 -84.05418142659951 46.31650165818427 -84.13492999353717 46.533345481105414 -84.52321746005939 46.472794376183245 -84.59804339257596 46.57003344553751 -84.42029159181043 46.69094383217885 -84.48206433162949 46.76148344920455 -84.56710900561941 46.68935572925615 -84.56101597692225 46.818109848723886 -84.35517177332652 46.875389886362726 -84.52192285894546 46.944306534362084 -84.61517145294997 46.888916721210514 -84.77926529404755 46.974527015027284 -84.58580063464053 47.30050868855297 -85.03767104875512 47.59974700427776 -84.84676015399802 47.94784274147864 -85.57608971993716 47.91771617364035 -85.87519188078107 47.982776200127745 -86.14472913056376 48.24292986125559 -86.42861904126944 48.77389771134165 -86.63694589945834 48.72982508396319 -86.70533262815542 48.81130801841839 -86.86346965071327 48.74526751769736 -86.9559860699276 48.81805434198355 -87.27086378581015 48.75915381355603 -87.92916617931638 48.928782765152164 -88.04261934882835 49.01717782096208 -88.24851363669084 48.940053367424845 -88.09053026523148 48.7751114033388 -88.19509528762669 48.58926214055653 -88.34107787655316 48.644440414718176 -88.30216536276771 48.56674316944155 -88.42634223061707 48.56809655859444 -88.56053504655083 48.409496108549135 -88.59547579616368 48.480551196816464 -88.30110999492958 48.7562111488874 -88.49401887967639 48.841036796860145 -88.73486781534474 48.35687635364053 -88.93774839620522 48.302910214609476 -88.7717338055911 48.574805744252664 -89.14133994429064 48.4814579187876 -89.32591035852883 48.11184429315402 -89.57324853444082 47.99734712616459 -89.89853936170626 47.98803866295609 -90.1358698652749 48.112685011511616 -90.75061521884555 48.09164777688809 -90.88610680250217 48.24659542669555 -91.25118208011578 48.08356083059144 -91.5679034161554 48.04396633009329 -91.55751969593346 48.10826657236464 -91.9594563699593 48.23449270552322 -92.05515997547806 48.359052848375136 -92.26216218099503 48.35457503604599 -92.26952088917709 48.24764107180317 -92.37007840361927 48.22119133005152 -92.45640779070047 48.41396408587672 -92.71256318501297 48.46282248101469 -92.63541456696257 48.542609107297 -92.94992050851991 48.62993546777819 -93.2594573063283 48.64197890665954 -93.79415792373537 48.516192860069644 -93.85024062787971 48.63125027587442 -94.58740866120945 48.719612934578734 -94.68710125776636 48.7786994206822 -94.81741776432085 49.320203048129926 -95.15398033943787 49.385526658995616 -95.15315109617895 52.84057310608692 -93.6295535316506 53.75020269629366 -88.98649334011768 56.84704592193139 -88.86611751473573 56.84777124835767 diff --git a/linking/features/lhin.mapml b/linking/features/lhin.mapml index b1d1d21e..68686eb7 100644 --- a/linking/features/lhin.mapml +++ b/linking/features/lhin.mapml @@ -18,7 +18,7 @@ Champlain - + 1559332.94849 -226542.49462 1559226.82136 -226710.73601 1558953.94261 -226939.42183 1559486.16899 -226099.84425 1559332.94849 -226542.49462 diff --git a/multiple-extents/index.html b/multiple-extents/index.html index 79ca7291..64261bcd 100644 --- a/multiple-extents/index.html +++ b/multiple-extents/index.html @@ -10,14 +10,10 @@ - + - - - - - - + + @@ -31,6 +27,12 @@ + + + + + + diff --git a/refactoring-temporary/cbmtile-cbmt.mapml b/refactoring-temporary/cbmtile-cbmt.mapml index 1f751d7c..84842901 100644 --- a/refactoring-temporary/cbmtile-cbmt.mapml +++ b/refactoring-temporary/cbmtile-cbmt.mapml @@ -3,15 +3,16 @@ Canada Base Map - Transportation (CBMT) - - + + + diff --git a/refactoring-temporary/osm.mapml b/refactoring-temporary/osm.mapml index 73658ad1..2fa8b1b1 100644 --- a/refactoring-temporary/osm.mapml +++ b/refactoring-temporary/osm.mapml @@ -3,6 +3,8 @@ OpenStreetMap + + diff --git a/screenreader/announce-zoom/index.html b/screenreader/announce-zoom/index.html index 7dc22713..75a71e1c 100644 --- a/screenreader/announce-zoom/index.html +++ b/screenreader/announce-zoom/index.html @@ -13,10 +13,11 @@ - + Paris, the City of Light + diff --git a/screenreader/restaurants/index.html b/screenreader/restaurants/index.html index 6a13ce64..63864281 100644 --- a/screenreader/restaurants/index.html +++ b/screenreader/restaurants/index.html @@ -6,11 +6,12 @@ Ottawa Restaurants + - + Ottawa Restaurants Map diff --git a/shared/restaurants/restaurants.xml b/shared/restaurants/restaurants.xml index b0e67bb3..a3ae4b3f 100644 --- a/shared/restaurants/restaurants.xml +++ b/shared/restaurants/restaurants.xml @@ -3,13 +3,22 @@ Restaurants - + + + + + The Prescott diff --git a/shared/script/geogratis-search-handler.js b/shared/script/geogratis-search-handler.js new file mode 100644 index 00000000..985cb7dd --- /dev/null +++ b/shared/script/geogratis-search-handler.js @@ -0,0 +1,76 @@ +document.addEventListener('DOMContentLoaded', () => { + const viewer = document.querySelector('mapml-viewer'); + + function renderResults(container, responses, map) { + container.innerHTML = ''; + for (const r of responses) { + const data = r.data; + if (!data) continue; + // geogratis format (items array) + if (data.items) { + for (const item of data.items) { + const btn = document.createElement('button'); + btn.className = 'mapml-search-result'; + btn.setAttribute('type', 'button'); + btn.textContent = item.name + + (item.concise ? ' (' + item.concise.code + ')' : '') + + (item.province ? ', ' + item.province.code : ''); + btn.addEventListener('click', () => { + if (item.bbox && item.bbox.length === 4) { + const [west, south, east, north] = item.bbox; + map.fitBounds([[south, west], [north, east]]); + } else { + map.setView([item.latitude, item.longitude], 10); + } + map._container + .querySelector('.mapml-search-panel') + .classList.remove('mapml-search-panel-open'); + }); + container.appendChild(btn); + } + } + // GeoJSON format (Photon etc.) + if (data.features) { + for (const feature of data.features) { + const props = feature.properties || {}; + const parts = [props.name]; + for (const key of ['city', 'county', 'state', 'country']) { + if (props[key] && props[key] !== props.name) parts.push(props[key]); + } + const btn = document.createElement('button'); + btn.className = 'mapml-search-result'; + btn.setAttribute('type', 'button'); + btn.textContent = parts.filter(Boolean).join(', ') || 'Unnamed'; + btn.addEventListener('click', () => { + const bbox = feature.bbox + || (props.extent && props.extent.length === 4 ? props.extent : null); + if (bbox && bbox.length === 4) { + const [west, south, east, north] = bbox; + map.fitBounds([[south, west], [north, east]]); + } else if (feature.geometry && feature.geometry.coordinates) { + const [lon, lat] = feature.geometry.coordinates; + map.setView([lat, lon], props.zoom || 14); + } + map._container + .querySelector('.mapml-search-panel') + .classList.remove('mapml-search-panel-open'); + }); + container.appendChild(btn); + } + } + } + } + + viewer.addEventListener('mapsuggestions', (e) => { + e.preventDefault(); + const container = viewer._map._container.querySelector('.mapml-search-results'); + renderResults(container, e.detail.responses, viewer._map); + }); + + viewer.addEventListener('mapsearch', (e) => { + e.preventDefault(); + const container = viewer._map._container.querySelector('.mapml-search-results'); + renderResults(container, e.detail.responses, viewer._map); + }); + +}); diff --git a/shared/script/photon-search-handler.js b/shared/script/photon-search-handler.js new file mode 100644 index 00000000..985cb7dd --- /dev/null +++ b/shared/script/photon-search-handler.js @@ -0,0 +1,76 @@ +document.addEventListener('DOMContentLoaded', () => { + const viewer = document.querySelector('mapml-viewer'); + + function renderResults(container, responses, map) { + container.innerHTML = ''; + for (const r of responses) { + const data = r.data; + if (!data) continue; + // geogratis format (items array) + if (data.items) { + for (const item of data.items) { + const btn = document.createElement('button'); + btn.className = 'mapml-search-result'; + btn.setAttribute('type', 'button'); + btn.textContent = item.name + + (item.concise ? ' (' + item.concise.code + ')' : '') + + (item.province ? ', ' + item.province.code : ''); + btn.addEventListener('click', () => { + if (item.bbox && item.bbox.length === 4) { + const [west, south, east, north] = item.bbox; + map.fitBounds([[south, west], [north, east]]); + } else { + map.setView([item.latitude, item.longitude], 10); + } + map._container + .querySelector('.mapml-search-panel') + .classList.remove('mapml-search-panel-open'); + }); + container.appendChild(btn); + } + } + // GeoJSON format (Photon etc.) + if (data.features) { + for (const feature of data.features) { + const props = feature.properties || {}; + const parts = [props.name]; + for (const key of ['city', 'county', 'state', 'country']) { + if (props[key] && props[key] !== props.name) parts.push(props[key]); + } + const btn = document.createElement('button'); + btn.className = 'mapml-search-result'; + btn.setAttribute('type', 'button'); + btn.textContent = parts.filter(Boolean).join(', ') || 'Unnamed'; + btn.addEventListener('click', () => { + const bbox = feature.bbox + || (props.extent && props.extent.length === 4 ? props.extent : null); + if (bbox && bbox.length === 4) { + const [west, south, east, north] = bbox; + map.fitBounds([[south, west], [north, east]]); + } else if (feature.geometry && feature.geometry.coordinates) { + const [lon, lat] = feature.geometry.coordinates; + map.setView([lat, lon], props.zoom || 14); + } + map._container + .querySelector('.mapml-search-panel') + .classList.remove('mapml-search-panel-open'); + }); + container.appendChild(btn); + } + } + } + } + + viewer.addEventListener('mapsuggestions', (e) => { + e.preventDefault(); + const container = viewer._map._container.querySelector('.mapml-search-results'); + renderResults(container, e.detail.responses, viewer._map); + }); + + viewer.addEventListener('mapsearch', (e) => { + e.preventDefault(); + const container = viewer._map._container.querySelector('.mapml-search-results'); + renderResults(container, e.detail.responses, viewer._map); + }); + +}); diff --git a/styling/alternate-styles/imagery.mapml b/styling/alternate-styles/imagery.mapml index 84c520ba..cbaf3f11 100644 --- a/styling/alternate-styles/imagery.mapml +++ b/styling/alternate-styles/imagery.mapml @@ -7,6 +7,8 @@ + +