【发布时间】:2016-06-05 20:57:28
【问题描述】:
我对 ngMap 和形状有疑问。
一个形状可以有两个不同的属性,可拖动或可编辑。
editable 在圆的中间添加一个点来拖动它。并在外侧4个点改变半径的大小。 可以在这里看到: EDITABLE https://ngmap.github.io/#/!shape_circle_with_current_position.html
可以在此处看到可拖动对象:DRAGABLE https://rawgit.com/allenhwkim/angularjs-google-maps/master/testapp/events.html
<ng-map zoom="11" center="current-position">
<shape draggable="true" on-dragend="someFunction()"></shape>
</ng-map>
当我拖动它时,我可以使用“on-dragend”指令(这是一个指令吗?)。 但我不知道我可以使用什么指令与 editable="true"。
<ng-map zoom="11" center="current-position">
<shape ??on-edit??="someFunction()" editable="true"></shape>
</ng-map>
我想在形状被编辑后调用一个函数,这样我就可以更新我的“雷达”和“纬度”、“经度”值。 像 on-edit , on-change 之类的东西?我已经尝试过暴力破解了:D
谢谢!
【问题讨论】:
标签: google-maps google-maps-api-3 ng-map