You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to scale better the website performance, we could consider switching from GeoJSON to flatgeobuff as it performs better and it is a more compact transport format.
Change should be pretty easy to do according to this snippet from the OpenLayers example:
// data source for mapconstsource=newol.source.Vector({loader: asyncfunction(){// Fetch the flatgeobufferconstresponse=awaitfetch('/test/data/UScounties.fgb')// ...and parse all its featuresforawait(letfeatureofflatgeobuf.deserialize(response.body)){feature.getGeometry().transform('EPSG:4326','EPSG:3857')// add each feature to the map, after projecting it tothis.addFeature(feature)}}});
Opinions?
The text was updated successfully, but these errors were encountered:
Another option would be to research how to use PMTiles, probably through tippecanoe to produce a single file source of vector tiles that can be deployed easily as a static dataset.
jsanz
changed the title
Transition to use flatgeobuf
Improve data access
Aug 25, 2023
In order to scale better the website performance, we could consider switching from GeoJSON to flatgeobuff as it performs better and it is a more compact transport format.
Change should be pretty easy to do according to this snippet from the OpenLayers example:
Opinions?
The text was updated successfully, but these errors were encountered: