I'm working with sockets, where I send coordinates every time (lat, lon) and to show these coordinates I use ngMap, when I have a first coordinate it is shown on my map but if I get a second coordinate the marker is duplicated, is where I want to use ng-change () so that when there are new coordinates remove the marker and always create a single one. Below I share my code:
<ng-map id="mapa_inicio" center= "-3.989785, -79.205805" zoom="13">
<marker ng-repeat = "u in ubicacion track by $index"
position="{{conversion(u.latitud)}},{{conversion(u.longitud)}}" tittle={{u.id_ruta}} ng-change="remover_marker()">
</marker>
</ng-map>
js:
$scope.remover_marker = function(){
console.log("aqui haré el control deseado")
}
My mistake is that the ng-change () does not work, how can I solve it? I thank you in advance