AlexLavoie42 / Nuxt-Mapbox

Elegant Mapbox integration with Nuxt
81 stars 11 forks source link

MapboxCustomGeocoder don't filter by country #34

Closed agracia-foticos closed 1 year ago

agracia-foticos commented 1 year ago

I'm using this code <MapboxCustomGeocoder v-model="resultGeocoder" :placeholder="t('checkout.pickpoint_placeholder')" types="country,region,place,postcode,locality,neighborhood" countries="ES" :proximity="null" class="text-center bg-secondary-ultralight block w-full min-w-0 flex-1 rounded-none rounded-r-md border-gray-200 focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm" />

image

It shows localizations that there isn´t in Spain

agracia-foticos commented 1 year ago

Also we havent placeholder :)

AlexLavoie42 commented 1 year ago

Looking at the code you sent, you did not put countries inside the options parameter. All of the mapbox options must go into that property.

Also, I'm not 100% certain, but I think the country code should be lower case for mapbox.

agracia-foticos commented 1 year ago

@AlexLavoie42 WORKS!!! Thank you!!!