@maptiler/geocoding-control 0.0.32 → 0.0.36
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/README.md +4 -4
- package/dist/leaflet.js +315 -312
- package/dist/leaflet.umd.cjs +1 -1
- package/dist/lib/LeafletGeocodingControl.d.ts +1 -1
- package/dist/lib/MaplibreglGeocodingControl.d.ts +1 -1
- package/dist/lib/maplibreglMapController.d.ts +4 -0
- package/dist/lib/types.d.ts +3 -1
- package/dist/main.d.ts +1 -1
- package/dist/maplibregl.js +2046 -652
- package/dist/maplibregl.umd.cjs +22 -1
- package/dist/style.css +1 -1
- package/package.json +7 -4
- package/src/lib/GeocodingControl.svelte +44 -8
- package/src/lib/LeafletGeocodingControl.ts +1 -0
- package/src/lib/MaplibreglGeocodingControl.ts +3 -2
- package/src/lib/maplibreglMapController.ts +282 -0
- package/src/lib/types.ts +3 -1
- package/src/lib/maplibreMapController.ts +0 -149
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ import maplibregl from "maplibre-gl";
|
|
|
19
19
|
import { GeocodingControl } from "@maptiler/geocoding-control/maplibre";
|
|
20
20
|
import "@maptiler/geocoding-control/dist/style.css";
|
|
21
21
|
|
|
22
|
-
const API_KEY = "
|
|
22
|
+
const API_KEY = "YOUR_MAPTILER_API_KEY_HERE";
|
|
23
23
|
|
|
24
24
|
const map = new maplibregl.Map({
|
|
25
25
|
container: "map", // id of HTML container element
|
|
@@ -128,12 +128,12 @@ Component API matches API described above and options are exposed as component p
|
|
|
128
128
|
<script lang="ts">
|
|
129
129
|
import GeocodingControl from "@maptiler/geocoding-control/src/lib/GeocodingControl.svelte";
|
|
130
130
|
import GeocodingControl from "@maptiler/geocoding-control/src/lib/GeocodingControl.svelte";
|
|
131
|
-
import {
|
|
131
|
+
import { createMaplibreglMapController } from "@maptiler/geocoding-control/src/lib/maplibreglMapController";
|
|
132
132
|
import type { MapController } from "@maptiler/geocoding-control/src/lib/types";
|
|
133
133
|
import maplibregl from "maplibre-gl";
|
|
134
134
|
import "maplibre-gl/dist/maplibre-gl.css";
|
|
135
135
|
|
|
136
|
-
const apiKey = "
|
|
136
|
+
const apiKey = "YOUR_MAPTILER_API_KEY_HERE";
|
|
137
137
|
|
|
138
138
|
let mapController: MapController;
|
|
139
139
|
|
|
@@ -146,7 +146,7 @@ Component API matches API described above and options are exposed as component p
|
|
|
146
146
|
container,
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
const mapController =
|
|
149
|
+
const mapController = createMaplibreglMapController(map, maplibregl);
|
|
150
150
|
}
|
|
151
151
|
</script>
|
|
152
152
|
|