I want to display information about the marker on right side of map on
marker click.right now after marker click a modal window will appear in
that i am entering a mobile number after that corresponding marker
information is displaying, after that clicking on the other marker view is
not updating , same view is retaining .
here is the code
for (var i = 0; i < $scope.centers.length; i++) {
var marker = new google.maps.Marker({
position: new google.maps.LatLng($scope.centers[i].lat,
$scope.centers[i].lng),
map: map,
title: $scope.centers[i].title,
information:$scope.centers[i].information
});
/*
var content = '<a ng-click="cityDetail(' + i + ')">View</a>';
var compiledContent = $compile(content)($scope)
*/
google.maps.event.addListener(marker, 'click',
(function(marker, scope) {
return function() {
if($rootScope.showMobile){
$scope.cityDetail();
$scope.frstCenter = marker.information;
}
else{
$rootScope.showwithOutMob= true;
$scope.afterCenter = marker.information;
$scope.frstCenter = " ";
}
};
})(marker, $scope));
}
I tried to to change the scope values by doing this $scope.frstCenter = "
"; then also view is not updating. i am taking mobile number only once
after corresponding marker info is displaying , if i click on other marker
corresponding marker info is not updating . please help me .
[Here][1] is my plunker code. in plunker marker information is displaying
at down of the map .
[1]: https://plnkr.co/edit/KIvw5g0iKIAaSIwUS3AU?p=preview
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.