Answer the question
In order to leave comments, you need to log in
How to limit SuggestView search area to few cities?
Everywhere it is recommended to add the desired city name to the user's request, but what should I do if I have several cities and no one selects it beforehand?
There is a conditional rectangle on the map, which includes several cities.
The boundedBy parameter has no effect on the scope of the search.
Answer the question
In order to leave comments, you need to log in
boundedBy - "area on the map where the object is supposed to be located". These are priorities, not restrictions for the search. It looks like you will have to file your own implementation of ISuggestProvider, where you can manually use geocode, in which boundedBy will work as it should along with the strictBounds=true option. Push this implementation into options.provider for SuggestView
Simply not. I see only the option that you implement your own auto-completion, which in fact will call Yandex, but filter the result only by the necessary cities.
You can set the required square in options with the parameter: boundedBy
https://yandex.ru/dev/maps/jsapi/doc/2.1/ref/refer...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question