@plx49638

Как создать YMapClusterer на angular?

const coordinates  = [
          [37.64, 55.76],
          [37.63, 55.7],
     
        ];


        const points = coordinates.map((lnglat, i) => ({
          type: 'Point',
          id: i,
          geometry: {       type: 'Point', coordinates: lnglat},
          properties: {name: 'Point of issue of orders',  description: "string"}
        }));


        const clusterer = new YMapClusterer({
          method: clusterByGrid({gridSize: 64}),
          features:  points,
          marker: (feature) => new YMapMarker({
            coordinates: feature.geometry.coordinates,
            source: 'my-source'
          }),
          cluster: (coordinates, cluster) => new YMapMarker({
            coordinates,
            source: 'my-source'
          })

        })


6658ef1763a3e066614538.png

6658ef5b05a3c819026708.png

Не понимаю почему он жалуется на тип переменной (хотя все по документации делаю )

https://yandex.ru/dev/jsapi30/doc/ru/ref/packages/...
  • Вопрос задан
  • 6 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы