Refine geoSearch widget by url params

Hey there,

My actual form uses the geoSearch widget. I custom it and i activated the enableRefineOnMapMove. I added a router to expose some params in my url.
So now i have a dynamic url like this : http://dev.localhost/results/taxi?coordinates=49.980946341065554%2C9.35036435723305%2C45.8303797318757%2C0.5613018572330476

taxi is the query, and no problem with it.
coordinates are provided by the geoSearch widget. Now i’d like to refresh my page and set these coordinates to the widget… And that’s why i’m here :smiley:

I don’t understand very well how routeToState works. It seems we can set some refinement, some config params but how the mapping is done ? How query or page matched with widgets ?

This is my code :

parseUrl, stateToRoute are ok. the query and page from routeToState too.
I try to set the coordinates to my geoSearch widget, but there is nothing. And i’m sure i just didnt get how i have to do that…

Thanks a lot for your help,
Cheers !

Hi @renish,

Thanks for contacting Algolia. Can you provide a codesandbox with minimum code needed to reproduce your issue, even if not working as expected:

We provide much of the boilerplate done in the samples above. Please choose your flavor of InstantSearch and share it back to us when available.