Select to view content in your preferred language

How to disable "Use current location" prompt for SearchWidget

527
1
02-01-2023 12:38 PM
noah
by
Emerging Contributor

How do I disable this prompt "Use current location" with the JavaScript SDK API for SearchWidget?

Screenshot 2023-02-01 at 15.36.53.png

I only want to search within the custom source layer. No location needed. I can't find any API for this.

0 Kudos
1 Reply
JoelBennett
MVP Regular Contributor

When instantiating the Search widget, set locationEnabled to false:

const searchWidget = new Search({
	locationEnabled: false,
	view: view
});