Hi all, I’m using angular-google-maps (http://angular-ui.github.io/angular-google-maps/#) to show a map into my app. My problem is that when user click on a marker the infowindow is showed and close instantly and he needs to reclick on marker to see it (the marker remain open).
This is my HTML code:
<ui-gmap-google-map set-height center='map.center' zoom='map.zoom' data-tap-disabled="true">
<ui-gmap-markers models="locations" coords="'self'">
<ui-gmap-windows show="show">
<div ng-non-bindable>
<a href="">{{::title}}</a><br>
<img class="markerImg" src="{{::field_immagini}}">
<br><br>
<a href="#/tab/location/{{::id}}">Vai alla scheda</a>
</div>
</ui-gmap-windows>
</ui-gmap-markers>
</ui-gmap-google-map>
and “locations” is defined in the relative Ctrl:
$scope.map = { center: { latitude: 41.9, longitude: 12.4833333 }, zoom: 5 };
$scope.locations = $localstorage.getObject('locations');
angular.forEach($scope.locations,function(v,k) {
$scope.locations[k].id = k;
$scope.locations[k].longitude = $scope.locations[k].locationsZB.coordinates[0];
$scope.locations[k].latitude = $scope.locations[k].locationsZB.coordinates[1];
$scope.locations[k].icon = $scope.locations[k].field_immagini;
$scope.locations[k].show = false;
$scope.locations[k].onClick = function() {
console.log("Clicked!");
$scope.locations[k].show = !$scope.locations[k].show;
};
});
Thanks in advance.
M.