@maptiler/geocoding-control 0.0.84 → 0.0.86

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/maplibregl.d.ts CHANGED
@@ -1,60 +1,9 @@
1
- import type { FillLayerSpecification, FitBoundsOptions, FlyToOptions, IControl, LineLayerSpecification, Map, MarkerOptions } from "maplibre-gl";
1
+ import type { Map } from "maplibre-gl";
2
2
  import * as maplibregl from "maplibre-gl";
3
- import type { ControlOptions } from "./types";
4
- export { createMaplibreglMapController } from "./maplibreglMapController";
5
- type MapLibreGL = Pick<typeof maplibregl, "Marker" | "Popup">;
6
- type MapLibreControlOptions = Omit<ControlOptions, "apiKey"> & {
7
- /**
8
- * Maptiler API key. Optional if used with MapTiler SDK.
9
- */
10
- apiKey?: string;
11
- /**
12
- * A MapLibre GL instance to use when creating [Markers](https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker).
13
- * Required if `options.marker` is `true`.
14
- */
15
- maplibregl?: MapLibreGL;
16
- /**
17
- * If `true`, a [Marker](https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker) will be added to the map at the location of the user-selected result using a default set of Marker options.
18
- * If the value is an object, the marker will be constructed using these options.
19
- * If `false`, no marker will be added to the map.
20
- * Requires that `options.maplibregl` also be set.
21
- *
22
- * @default true
23
- */
24
- marker?: boolean | MarkerOptions;
25
- /**
26
- * If `true`, [Markers](https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker) will be added to the map at the location the top results for the query.
27
- * If the value is an object, the marker will be constructed using these options.
28
- * If `false`, no marker will be added to the map.
29
- * Requires that `options.maplibregl` also be set.
30
- *
31
- * @default true
32
- */
33
- showResultMarkers?: boolean | MarkerOptions;
34
- /**
35
- * If `false`, animating the map to a selected result is disabled.
36
- * If `true`, animating the map will use the default animation parameters.
37
- * If an object, it will be passed as options to the map `flyTo` or `fitBounds` method providing control over the animation of the transition.
38
- *
39
- * @default true
40
- */
41
- flyTo?: boolean | (FlyToOptions & FitBoundsOptions);
42
- /**
43
- * Style for full feature geometry GeoJSON.
44
- */
45
- fullGeometryStyle?: {
46
- fill: Pick<FillLayerSpecification, "layout" | "paint" | "filter">;
47
- line: Pick<LineLayerSpecification, "layout" | "paint" | "filter">;
48
- };
49
- };
50
- export declare class GeocodingControl extends EventTarget implements IControl {
51
- #private;
52
- constructor(options?: MapLibreControlOptions);
53
- onAdd(map: Map): HTMLDivElement;
54
- setOptions(options: MapLibreControlOptions): void;
55
- setQuery(value: string, submit?: boolean): void;
56
- setReverseMode(value: boolean): void;
57
- focus(): void;
58
- blur(): void;
59
- onRemove(): void;
3
+ import type GeocodingControlComponent from "./GeocodingControl.svelte";
4
+ import { MapLibreBasedGeocodingControl, type Props } from "./MapLibreBasedGeocodingControl";
5
+ export { createMapLibreGlMapController } from "./maplibreglMapController";
6
+ export declare class GeocodingControl extends MapLibreBasedGeocodingControl {
7
+ getMapLibre(): typeof maplibregl;
8
+ getExtraProps(_map: Map, _div: HTMLElement): Partial<Props<GeocodingControlComponent>>;
60
9
  }