Answer the question
In order to leave comments, you need to log in
How to generate points on a map from an array (Yandex maps)?
Good to everyone!
There is a map, there is an array, you need to scatter geopoints on the map, the coordinates of which are stored in an array, how to get them out of there?
Tried to do like this:
myMap.geoObjects.add(cityData.data.result.items.map((items, idx) => {
new window.ymaps.Placemark([items.geo.l, items.geo.r], {
hintContent: 'Контент',
balloonContent: 'Это красивая метка'
},
{
iconLayout: 'default#image',
iconImageHref: 'logo',
iconImageSize: [80, 80],
})
}))
const myPlacemark = new window.ymaps.Placemark([65.591182, 57.101262], {
hintContent: 'Контент',
balloonContent: 'Это красивая метка'
},
{
iconLayout: 'default#image',
iconImageHref: 'logo',
iconImageSize: [80, 80],
})
myMap.geoObjects.add(myPlacemark)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question