Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@maptiler/geocoding-control",
"version": "2.1.0",
"version": "2.1.1",
"description": "The Javascript & TypeScript Map Control component for MapTiler Geocoding service. Easy to be integrated into any JavaScript mapping application.",
"type": "module",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion src/GeocodingControl.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@
effTypes?.length !== 1
) {
console.warn(
"For reverse geocoding when `limit` > 1 then `types` must contain single value.",
"For reverse geocoding when limit > 1 then types must contain single value.",
);
}

Expand Down
5 changes: 2 additions & 3 deletions src/maptilersdk.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import * as maptilersdk from "@maptiler/sdk";
import type * as maplibregl from "maplibre-gl";
import type { Map } from "maplibre-gl";
import { name, version } from "../package.json";
import {
crateClasses,
type MapLibreBaseControlOptions,
} from "./MapLibreBasedGeocodingControl";

import { name, version } from "../package.json";

export { createMapLibreGlMapController } from "./maplibregl-controller";

const { MapLibreBasedGeocodingControl, events } =
Expand Down Expand Up @@ -42,7 +41,7 @@ export class GeocodingControl
implements maptilersdk.IControl
{
onAdd(map: maptilersdk.Map): HTMLElement {
map.telemetry.registerModule(name, version);
map.telemetry?.registerModule(name, version);
return super.onAddInt(map as unknown as maplibregl.Map);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,11 @@ export type ControlOptions = {

/**
* Limits results for reverse geocoding.
* Applied only if effective types contain a single value.
* Applied only if value is 1 or effective types contain a single value.
*
* See also `reverseGeocodingTypes` option.
*
* Default: Value of the `limit` option if set, otherwise `1`.
* Default: The value of the `limit` option if set. If effective types contain a single value, the default is `1`. In all other cases, this option is not used.
*/
reverseGeocodingLimit?: number;

Expand Down