beyonk-group/svelte-mapbox

How to get GeoCoder selected result?

KasperPurunen opened this issue · 1 comments

Hi.

I'm using the map and geocoder componentes but I cant figure out how to get the clicked lat and lng from the clicked result. I fire the event on:result={somePlaceChangeFunction} but how can pass the coordinate information to that function or bind the values to varaibles?

Thank you!

@KasperPurunen check the demo code out. somePlaceChangeFunction will be passed the event parameter which has a detail property which contains coordinate info.