diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 78ddb54..94521d9 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -17,7 +17,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
- cache: "pnpm"
+ cache: 'pnpm'
- name: Install dependencies
run: pnpm install
@@ -27,4 +27,3 @@ jobs:
- name: Lint
run: pnpm run check
-
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f01f315..1dcd579 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '22'
- cache: "pnpm"
+ cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- run: pnpm install
- run: pnpm publish --provenance --access public --no-git-checks
diff --git a/package.json b/package.json
index 0af8ce3..8c3f839 100644
--- a/package.json
+++ b/package.json
@@ -51,6 +51,7 @@
"@sveltejs/vite-plugin-svelte": "^4.0.1",
"@tailwindcss/typography": "^0.5.15",
"@types/eslint": "^9.6.1",
+ "@types/geojson": "^7946.0.14",
"autoprefixer": "^10.4.20",
"bits-ui": "1.0.0-next.64",
"clsx": "^2.1.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index cf3d10f..2f11c77 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -35,6 +35,9 @@ importers:
'@types/eslint':
specifier: ^9.6.1
version: 9.6.1
+ '@types/geojson':
+ specifier: ^7946.0.14
+ version: 7946.0.14
autoprefixer:
specifier: ^10.4.20
version: 10.4.20(postcss@8.4.49)
diff --git a/src/content/examples/Index.svelte b/src/content/examples/Index.svelte
index 420d14c..7499959 100644
--- a/src/content/examples/Index.svelte
+++ b/src/content/examples/Index.svelte
@@ -11,11 +11,12 @@
'/examples/clusters': 'Clusters',
'/examples/limit-interaction': 'Limit Map Interactions',
'/examples/dynamic-image': 'Dynamic Image',
- '/examples/animate-images': 'Animate a series of images',
- '/examples/video-on-a-map': 'Video on a map',
+ '/examples/animate-images': 'Animate a Series of Images',
+ '/examples/video-on-a-map': 'Video on a Map',
'/examples/canvas-source': 'Canvas Source',
'/examples/fullscreen': 'Fullscreen',
'/examples/geolocate': 'Locate the User',
+ '/examples/image-loader': 'Loading Images',
'/examples/custom-control': 'Custom Control',
'/examples/custom-protocol': 'Custom Protocols',
'/examples/contour': 'Contour Lines'
diff --git a/src/content/examples/image-loader/Images.svelte b/src/content/examples/image-loader/Images.svelte
new file mode 100644
index 0000000..5fb678e
--- /dev/null
+++ b/src/content/examples/image-loader/Images.svelte
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/content/examples/image-loader/content.svelte.md b/src/content/examples/image-loader/content.svelte.md
new file mode 100644
index 0000000..a230f4e
--- /dev/null
+++ b/src/content/examples/image-loader/content.svelte.md
@@ -0,0 +1,14 @@
+---
+title: Loading Images
+description: Utility for loading images from URLs
+---
+
+
+
+
+
+
diff --git a/src/lib/maplibre/index.ts b/src/lib/maplibre/index.ts
index 1720f01..f9e8ea7 100644
--- a/src/lib/maplibre/index.ts
+++ b/src/lib/maplibre/index.ts
@@ -49,6 +49,9 @@ export { default as LogoControl } from './controls/LogoControl.svelte';
export { default as CustomControl } from './controls/CustomControl.svelte';
export { default as Hash } from './controls/Hash.svelte';
+// utilities
+export { default as ImageLoader } from './utilities/ImageLoader.svelte';
+
// extensions
export { default as PMTilesProtocol } from './extensions/PMTilesProtocol.svelte';
export { default as MapLibreContourSource } from './extensions/MapLibreContourSource.svelte';
diff --git a/src/lib/maplibre/map/Image.svelte b/src/lib/maplibre/map/Image.svelte
index 4f32e53..a180408 100644
--- a/src/lib/maplibre/map/Image.svelte
+++ b/src/lib/maplibre/map/Image.svelte
@@ -1,7 +1,7 @@
+
+{#if initialLoaded}
+ {@render children?.()}
+{/if}