please look into the image for reference >>when i select the checkbox i am calling the getTerritory function from toggleTerritory(),that draws the polygon.But the problem i am facing is, i am not able to clear the polygon when checkbox is unselected. Can anyone help me in doing this.
toggleTerritory function is below.
` $scope.toggleTerritory = function(item, list) {
var idx = list.indexOf(item);
if (idx > -1)
{
list.splice(idx, 1);
//How to clear the polygon here
}
else{
list.push(item);
$scope.getTerritory(item);//this creates the polygon
}
};`
Aucun commentaire:
Enregistrer un commentaire