【问题标题】:Yandex Maps Api - How can I change location the placemark?Yandex Maps Api - 如何更改地标的位置?
【发布时间】:2019-10-28 21:46:20
【问题描述】:

如何更改 Yandex 地图上的位置地标?

我添加了地标,需要使用 javascript 更改位置。

我试过了:

var LatLng = [ 22.2222, 33.3333 ];
myPlacemark.setPosition(LatLng);

但它不起作用。

【问题讨论】:

    标签: yandex-maps


    【解决方案1】:

    根据API documentation,方法名称是setCoordinates,它应用于地标的几何,所以以下应该可以工作:

    myPlacemark.geometry.setCoordinates(LatLng)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-07
      相关资源
      最近更新 更多