A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

Progressive Web Maps



I’ve posted my thoughts about a topic we’ve discussed here before and in the Maps for HTML CG under the heading of what name a custom element for Web maps should have.

Progressive Enhancement is the heart of the Web. The Maps for HTML Community Group wants it to work for Web maps.

I think that discussing that under the “What should the name be?” banner undervalues aspects that I hope I’ve brought to light in the post, and more generally the topic of Custom Elements and how they relate to extending the Web platform. I hope you will read it and respond here. To me, Progressive Enhancement is important as a technique to enhance the Web, whether just your own website or even the platform itself. I’ve posted under the Web mapping WICG category, because I really want the Web mapping community to get involved here and stake their claim on the Web. I am trying with this post to open the topic of how it applies or should apply, to Web maps. The reason the post is on gh-pages is because it has our custom element embedded in it, which I can’t (yet :wink:) do on medium or other blog platform. You can see for yourself if you think it progresses appropriately or not. Thanks for your time and consideration!

Thanks to Brian Kardell for an early review. I have extensively re-written the content based on his comments, but of course my mistakes are mine.


I tried to answer via Hypothesis, which elevated into an issue for them.

Here it is. You might like to load this page in different browsers or devices, or reload having disabled JavaScript, to get the idea of how it progresses and responds. It is a work in progress, so no promises are made.

With using the excellent uMatrix extension, I have come to see that one good habit for using the current polyfill can be hosting the JS on the same domain with the HTML and not geogratis.gc.ca, which omits CORS issues with aggressive blocking.


The web-map custom element can be installed locally with bower install web-map, I believe. I imagine using a public CDN one day, but I guess the best way today will be to install it for your own site. Thanks for trying it! Any feedback is welcome.


One quick question: One of the things I love using JS webmaps for is API responses. I do a lot with APIs, and the only way I can touch them is through JS AJAX libraries. Have you thought of methodology for updating, adding, or removing of points based on these calls?



Thanks for asking, good question.

I haven’t designed such a facility, mostly because of preoccupation with getting the basic architecture working.

It occurs to me that the map element could provide an API, which would allow client-side creation and manipulation of features. The client could programmatically integrate such features with server APIs using standard facilities.

So far the map API is focussed on adding and removing layers, using the DOM.

Certainly open to discussing what more we should / can put into the map/layer APIs.

Cheers, Peter