1

Infowindow is not beign displayed on click though the data is getting passed to the function. map.showInfoWindow is not functioning. Here's my html code

<ng-map zoom="15" center="{{prospects[0].latitude}},{{prospects[0].longitude}}">
        <marker position="{{prospect.latitude}},{{prospect.longitude}}" 
                id="{{prospect.street_id}}" 
                ng-repeat="prospect in prospects"
                on-click="showInfo(prospect)"></marker>

        <info-window id="prospectInfo">
                    <div ng-non-bindable="">
                        <h2>{{currentProspect.name}}</h2>
                    </div>
        </info-window>
</ng-map>

and this is my controller code

       NgMap.getMap()
            .then(function(map) {
                $scope.map = map;
            });
      $scope.showInfo = function(e, prospect){
            console.log(e);
            console.log(prospect);
            $scope.currentProspect = prospect;
            $scope.map.showInfoWindow('prospectInfo',this);
        }
Amit Singh
  • 1,790
  • 3
  • 17
  • 27

0 Answers0