O
O
onekrugoikov2020-08-01 12:02:47
Yandex maps
onekrugoikov, 2020-08-01 12:02:47

How to specify city/country in react-yandex-map?

Let's say I receive data from the server in the form of a city name and some kind of description.
But the problem is that react-yandex-map only works with coordinates.

import { YMaps, Map } from 'react-yandex-maps';

const App = () => (
  <YMaps>
    <div>
      My awesome application with maps!
      <Map defaultState={{ center: [55.75, 37.57], zoom: 9 }} />
    </div>
  </YMaps>
);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2020-08-01
@onekrugoikov

This is called geocoding - https://tech.yandex.ru/maps/geocoder/doc/desc/conc...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question