@maptiler/geocoding-control 0.0.81 → 0.0.82
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 +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ A geocoding control for [Maplibre GL JS](https://github.com/maplibre/maplibre-gl
|
|
|
4
4
|
|
|
5
5
|
The component can be used as an ES module or UMD module.
|
|
6
6
|
|
|
7
|
-
Geocoding control is also provided as [React component](#react) and a [Svelte component](#svelte).
|
|
7
|
+
Geocoding control is also provided as [React component](#react-component) and a [Svelte component](#svelte-component).
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -134,7 +134,7 @@ geocodingControl.addEventListener("optionsVisibilityChange", (e) => {
|
|
|
134
134
|
});
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
##
|
|
137
|
+
## React component
|
|
138
138
|
|
|
139
139
|
In addition to using the component as MapLibre GL or Leaflet Control it is also possible to use it stand-alone in React projects with or without MapLibre GL or Leaflet integration.
|
|
140
140
|
|
|
@@ -146,7 +146,7 @@ Component API matches API described above where options and events are exposed a
|
|
|
146
146
|
import { useEffect, useRef, useState } from "react";
|
|
147
147
|
import { GeocodingControl } from "@maptiler/geocoding-control/react";
|
|
148
148
|
import { createMaplibreglMapController } from "@maptiler/geocoding-control/maplibregl-controller";
|
|
149
|
-
import type { MapController } from "@maptiler/geocoding-control/
|
|
149
|
+
import type { MapController } from "@maptiler/geocoding-control/types";
|
|
150
150
|
import "@maptiler/geocoding-control/style.css";
|
|
151
151
|
import maplibregl from "maplibre-gl";
|
|
152
152
|
import "maplibre-gl/dist/maplibre-gl.css";
|
|
@@ -181,7 +181,7 @@ export function App() {
|
|
|
181
181
|
}
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
##
|
|
184
|
+
## Svelte component
|
|
185
185
|
|
|
186
186
|
In addition to using the component as MapLibre GL or Leaflet Control it is also possible to use it stand-alone in Svelte projects with or without MapLibre GL or Leaflet integration.
|
|
187
187
|
|
|
@@ -191,9 +191,9 @@ Component API matches API described above where options and events are exposed a
|
|
|
191
191
|
|
|
192
192
|
```svelte
|
|
193
193
|
<script lang="ts">
|
|
194
|
-
import GeocodingControl from "@maptiler/geocoding-control/
|
|
195
|
-
import { createMaplibreglMapController } from "@maptiler/geocoding-control/
|
|
196
|
-
import type { MapController } from "@maptiler/geocoding-control/
|
|
194
|
+
import GeocodingControl from "@maptiler/geocoding-control/GeocodingControl.svelte";
|
|
195
|
+
import { createMaplibreglMapController } from "@maptiler/geocoding-control/maplibregl";
|
|
196
|
+
import type { MapController } from "@maptiler/geocoding-control/types";
|
|
197
197
|
import maplibregl from "maplibre-gl";
|
|
198
198
|
import "maplibre-gl/dist/maplibre-gl.css";
|
|
199
199
|
|