beyonk-group / svelte-mapbox

MapBox Map and Autocomplete components for Svelte (or Vanilla JS)
MIT License
345 stars 61 forks source link

How do you search for places using the geocoder ? #66

Open vexkiddy opened 2 years ago

vexkiddy commented 2 years ago

I'm using your amazing sveltekit package on my side project, however when i search for places using the geocoder it doesnt retreive them, i just get countries and cities. when using a map on mapbox's site with all the filters turned off, it finds the place i'm searching for. should i be passing some options to the geocoder so that it doesn't do any filtering of what i'm typing ? if so, whats the best way to do this with the way you've implemented it ? thx!

eg. if you goto the link below and remove the filters you'll see that searching for 'soho house berlin' will return a result, however with the filters on, it doesn't.

https://docs.mapbox.com/playground/geocoding/

vexkiddy commented 2 years ago

ok, i think i worked it out, is this the correct way to do it ?

<Geocoder types={[]} accessToken="mytokenit" on:result={somePlaceChangeFunction} />