Closed prusswan closed 1 month ago
Yeah it ought to take source
as a parameter.
I would like to improve the OL library, it's ugly to work on as-is because I am maintaining the IIFE (script-includes) for OL as a separate file. Are you using a bundler with OpenLayers? I would prefer to kill the IIFE build and then we can put out a new version that uses TypeScript, etc.
Yeah it ought to take
source
as a parameter.I would like to improve the OL library, it's ugly to work on as-is because I am maintaining the IIFE (script-includes) for OL as a separate file. Are you using a bundler with OpenLayers? I would prefer to kill the IIFE build and then we can put out a new version that uses TypeScript, etc.
It depends, if I am using it as part of a NodeJS/web application, then bundler is an option. But if it is more like some HTML or static content that is embedded into something that isn't NodeJS (e.g. folium, Jupyter, or even DuckDB), something that can be used easily without bundler (e.g. like plain Leaflet.js) is much more convenient.
Maybe the ol-pmtiles functionality can be folded into pmtiles.js + examples?
the url
option for ol-pmtiles 1.0.0 can now either be a string
or a pmtiles.Source
.
https://www.npmjs.com/package/ol-pmtiles
Let me know if that resolve this.
While trying to load tiles from FileSource in OpenLayers using the existing examples, I had to modify PMTilesVectorSource (which assumes FetchSource). Below is how I fixed it, but maybe Source should be passed in instead?
Related: #407