-
|
The Allmaps maplibre plugin does not work for me with the latest version of maplibre (5.6.1). The plugin seems to have been created for a previous major version of maplibre (4.5.0). Is there a version of the plugin compatible with the current version? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 21 replies
-
|
Hey Ryan! We're working on a new version that's built for the latest version! Ideally, we would have multiple versions, one for each major version of MapLibre (and OpenLayers and Leaflet), but I haven't found an easy way to do this. On our side, it shouldn't be too complicated, 99% of the code will stay the same, only a few TS types are different. The complexity lies in creating a JS package that has multiple exports, each built for a different version of MapLibre. It should work something like this: import { WarpedMapLayer } from '@allmaps/maplibre/5'This is probably possible, need to look into it more! |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your help! I'll try to work on it a bit more today, but don't have much time, I'm going on vacation tomorrow. The only way I have been able to fix issues like this in the past is by just trying all solutions I could think of, publish a new version to npm and then hope it worked. Usually, it didn't. Or it did, and then it stopped working with a new version of vite or some other change. I don't think I'm the only one who is confused about how to best publish ESM packages. You can also try using an older version of the MapLibre plugin, like the one in this notebook: https://observablehq.com/@allmaps/maplibre-plugin, it uses https://cdn.jsdelivr.net/npm/@allmaps/[email protected]/+esm. |
Beta Was this translation helpful? Give feedback.
-
|
I read somewhere that maybe vite's |
Beta Was this translation helpful? Give feedback.
Hey Ryan! We're working on a new version that's built for the latest version! Ideally, we would have multiple versions, one for each major version of MapLibre (and OpenLayers and Leaflet), but I haven't found an easy way to do this. On our side, it shouldn't be too complicated, 99% of the code will stay the same, only a few TS types are different.
The complexity lies in creating a JS package that has multiple exports, each built for a different version of MapLibre. It should work something like this:
This is probably possible, need to look into it more!