Skip to content

Commit 276257c

Browse files
lesbaaLes Moffat
andauthored
RD-1000 Replace throw error with console.error (#89)
* RD-1000 Replace throw error with console.error to allow for keyless server setups * RD-1000 reword warning and convert to console.warn --------- Co-authored-by: Les Moffat <[email protected]>
1 parent e8b4d65 commit 276257c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/MapLibreBasedGeocodingControl.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ export function crateClasses<OPTS extends MapLibreBaseControlOptions>(
288288
};
289289

290290
if (!props.apiKey) {
291-
throw new Error("no apiKey provided");
291+
console.warn(
292+
"No MapTiler Cloud API key was provided, some or all geocoding requests may fail",
293+
);
292294
}
293295

294296
this.#gc = new GeocodingControlComponent({ target: div, props });

0 commit comments

Comments
 (0)