GeoPortal migrated to Mapbox GL JS
My migration of GeoPortal from Leaflet to Mapbox GL JS is live (Github). I’m using a combination of OSM2VectorTiles, some vector tiles of our own data created with Tippecanoe, and a few WMS raster overlays here and there from GeoServer. I’ve passed five hours in the office without anybody flinging feces at me, which is my most reliable success metric.
I made this release even more React-y. The map is a single React component. This lends a couple of benefits. First, I could quite easily swap in a Leaflet React component with the same class methods and use it exactly the same way, no other code changes necessary. Second, the loose coupling lets me wipe the map off the board if WebGL isn’t supported and everything else keeps working. You can still look up your address and weep at your impervious footage and ugly house photo, you just don’t get a map.
// load map if able to
Based on Google Analytics, slightly less than 2% of my users are on IE<11, and that number is dropping pretty fast. My rule is you have to be 5% to justify ruining the party for everybody else. Or really loud and near my desk, but since we just moved office locations, nobody knows where I am.