A
A
Alexander Ivanov2018-03-19 16:28:32
Yandex maps
Alexander Ivanov, 2018-03-19 16:28:32

How can I add an icon via vue to yandex-map?

<yandex-map 
:coords="mapCoordfghhgdsStart"
:zoom="zoom"
style="width: 100%; height: 266px;"
:cluster-options="{
    1: {clusterDisableClickZoom: true}
}"
:controls="[]"
:placemarks="placemarks"  
:hasBalloon="fallse"
>
    <ymap-marker 
    marker-type="placemark"
    :coords="dfghgdf"
    :balloon="{header: 'header', body: 'body', footer: 'footer'}"
    cluster-name="1"
    :icon="{
        iconLayout: 'default#image',
        iconImageHref: 'https://image.flaticon.com/icons/png/512/12/12778.png',
        iconImageSize: [15, 27],
        iconImageOffset: [-15, -27]
    }"
    ></ymap-marker>
</yandex-map>

I tried this but missed
the Yandex map plugin page:
https://github.com/PNKBizz/vue-yandex-map

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2018-03-19
@cimonlebedev

<ymap-marker 
 marker-type="placemark"
:coords="mapCoordsStart"
:balloonTemplate = "balloonTemplate"
:icon="{
    layout: 'default#image',
    imageHref: 'img/icon-city.svg',
    imageSize: [30, 40],
    imageOffset: [-15, -35]
}"
</ymap-marker>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question