openlayers-prefetching 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OpenLayers Prefetching Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # openlayers-prefetching
2
+
3
+ Prefetching Manager for OpenLayers - An extension to optimize tile loading and improve map performance.
4
+
5
+ ## Overview
6
+
7
+ This extension provides customizable prefetching of tiles. Multiple common prefecthing scenarios are covered:
8
+
9
+ - Spatial: Prefetch tiles outside of current viewport
10
+ - Layers: Prefetch layers that are not yet visible with the same viewport as from the current active layer
11
+ - Next-Location: Sometimes the locations where to navigate to next are already known. We can preload tiles for these.
12
+
13
+ We allow assigning priorities on what to prefetch first:
14
+
15
+ - Spatial/Background/Next/NextBackground
16
+ - Per Layer priorities: Some layers might typically be neded before others, so priorities per layer allow customizing this.
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ npm install openlayers-prefetching
22
+ ```
23
+
24
+ ## Examples
25
+
26
+ See the [examples](./examples) directory for complete working examples:
27
+
28
+ Disclaimer: The examples were mostly generated with GPT5.2-Codex.
29
+
30
+ We provide an example that allows a user to visualize Timeseries of Sentinel-2 Imagery over Europe from
31
+ [Microsoft Planetary Computer](https://planetarycomputer.microsoft.com/dataset/sentinel-2-l2a).
32
+ The timeseries of imagery is preloaded before the user navigates to the corresponding layers.
33
+
34
+
35
+ To run the examples locally:
36
+
37
+ ```bash
38
+ npm run build && npm run serve
39
+ ```
40
+
41
+ Then open http://localhost:8080/examples in your browser.
42
+
43
+ ## Compatibility
44
+
45
+ This extension was only tested with Openlayers 8.0. It may or may not be compatible with other versions.
46
+
47
+ ## License
48
+
49
+ MIT License - see [LICENSE](./LICENSE) file for details.
50
+
51
+ ## Contributing
52
+
53
+ Contributions are welcome! Please feel free to submit a Pull Request.