Wednesday 13 September 2023

Announcing: vscode-map-preview 0.6.0

This impromptu update fixes up Stamen tiles support to point to the new infrastructure managed by Stadia Maps.

Since we have to do this, we've taken this migration as an opportunity to add support for many more base layer types. 

The full list of base layers supported is now:

However, certain Bing and Stadia Maps layers will only be available in the base layer switcher if you provide respective API keys for these services through new configuration properties.

Don't like these base layers and want to bring your own? You can do that now too! If you have an XYZ tile set or WMTS service you want as a backdrop for your map previews, you can define such layers in your settings.json like so:

And they shall appear in the base layer switcher as layers you can switch to



This update also refactors the viewer HTML preparation by fetching the document (to be previewed) content on viewer init instead of embedding its content into the viewer HTML. This should improve responsiveness when previewing larger files, to the point that you can make out the new preview preparation message.

However, as I started to test this with bigger and bigger files, I eventually found a limit where the VSCode APIs will not cooperate with us. This limit is the point where VSCode will either not do syntax highlighting or tokenization or both and when we try to preview such a file, it will silently fail.

For this update, we will show a better error message on such files.

So for those who are hoping to use this extension to preview GeoJSON files whose size is in the range of gigabytes, sorry there's nothin I can do here 🤷‍♂️🤷‍♂️🤷‍♂️🤷‍♂️ I think at that point you are better served by using actual GIS tools/software for this purpose.

Now this this update is out the door, it's back to mapguide-rest development.

Tuesday 12 September 2023

Another temporary detour

While I was deep into reviving mapguide-rest to make sure it works with the PHP 8.1 bundled with MapGuide Open Source 4.0, I missed the memo that Stamen Maps is now under new management: Stadia Maps.

The most important aspect of this announcement was that come October 2023 (a month from now), current stamen tile URLs may stop redirecting/working and you should have migrated over to Stadia Maps by then.

Because Stamen tiles carried the same role as OpenStreetMap as a freely accessible base tiled layer for various open source projects of mine, this announcement has thrown a spanner in my works because come next month, Stamen tiles may not work and for continued support for these layers would require migration over to Stadia Maps.

So I have momentarily suspended my work on mapguide-rest to give focus to one of my other projects affected by this announcement: My VSCode map preview extension.

Because continued support for stamen map tiles requires migrating the extension over to use Stadia Maps, we might as well take this opportunity to add support in the extension for other base layers that Stadia Maps offers. And while we're at it, we might as well go all the way and add in Bing Maps, XYZ and WMTS base layers as well.

Or, just have a gander at this clip for a taste of what the next version of the VSCode map preview extension can do!


The next version of the extension will drop real soon and then it is back to mapguide-rest development.