DomMarker阻止下面的折线事件

问题描述 投票:0回答:1

我正在使用HereMaps JS sdk 3.1.15.1

  1. 我创建了折线
  2. 我已经在折线上的pointermove事件上创建了一个DomMarker
  3. 我使用事件的坐标更新DomMarker的几何形状
  4. DomMarker出现在折线上,但是当我继续移动光标,下面的折线上的事件将不再触发

是否有解决方法?使用goodle sdk,您可以在DomMarker的类似物上具有“ clickable”和“ draggable”属性,以便事件得以通过。

here-api
1个回答
0
投票
您是否有可能为此逻辑共享一些代码片段。但是,恐怕还没有提供Polyline直接可拖动标记。但是,您可以组合使用https://developer.here.com/documentation/examples/maps-js/resizable-geoshapes/resizable-polylinehttps://developer.here.com/documentation/examples/maps-js/markers/draggable-marker使我们的用例起作用。

此外,您还可以使UI对象HTML元素可拖动,并使用getID方法移动带有折线的事件调用。

https://developer.here.com/documentation/maps/3.1.15.1/api_reference/H.map.Polyline.html

© www.soinside.com 2019 - 2024. All rights reserved.