diff --git a/examples/leaflet/AppLeaflet.svelte b/examples/leaflet/AppLeaflet.svelte
index 2d8c313..343a145 100644
--- a/examples/leaflet/AppLeaflet.svelte
+++ b/examples/leaflet/AppLeaflet.svelte
@@ -17,7 +17,10 @@
}
onMount(() => {
- const map = L.map(containerElement).setView([51.505, -0.09], 13);
+ const map = L.map(containerElement).fitBounds([
+ [-65, -160],
+ [65, 160],
+ ]);
const scale = devicePixelRatio > 1.5 ? "@2x" : "";
@@ -32,7 +35,7 @@
'© MapTiler, ' +
'© OpenStreetMap contributors',
crossOrigin: true,
- }
+ },
).addTo(map);
new GeocodingControl({
diff --git a/examples/openlayers/AppOpenLayers.svelte b/examples/openlayers/AppOpenLayers.svelte
index 28c301d..690a4e2 100644
--- a/examples/openlayers/AppOpenLayers.svelte
+++ b/examples/openlayers/AppOpenLayers.svelte
@@ -20,15 +20,15 @@
throw new Error(errMsg);
}
+ const scale = devicePixelRatio > 1.5 ? "@2x" : "";
+
onMount(() => {
new Map({
target: containerElement,
layers: [
new TileLayer({
source: new XYZ({
- url:
- "https://api.maptiler.com/maps/basic-v2/{z}/{x}/{y}@2x.png?key=" +
- apiKey,
+ url: `https://api.maptiler.com/maps/basic-v2/{z}/{x}/{y}${scale}.png?key=${apiKey}`,
tileSize: 512,
attributions: [
'© MapTiler',
@@ -39,7 +39,7 @@
],
view: new View({
center: [0, 0],
- zoom: 2,
+ zoom: 0,
}),
controls: defaultControls().extend([
new GeocodingControl({