1

我正面臨傳單標記問題,當我刷新頁面時,標記可點擊,但是當我來自另一個頁面標記不可點擊時,我嘗試所有的事情,但沒有找到任何解決方案傳單標記圖標點擊事件不起作用

JAVASCRIPT:

angular.extend($scope, { 
center: { 
    lat: 51.505, 
    lng: -0.09, 
    zoom: 8 
}, 
markers: {}, 

});

mapService.getLocation(function(location) { 
    $scope.center = { 
     lat: location.lat, 
     lng: location.long, 
     zoom: 12 
    }; 
    $scope.$digest($scope.center); 
    mapService.getMarkers(
     new google.maps.LatLng(location.lat, location.long), 
     document.getElementById('map'), ['school'], 
     function(results) { 
      results.forEach(function(marker) { 
       var __location = marker.geometry.location.toJSON(); 
       $scope.markers[marker.id] = { 
        lat: __location.lat, 
        lng: __location.lng, 
        message: marker.name, 
        focus: false 
       } 
      }); 
      $scope.$digest($scope.markers); 
     } 
    ) 
}); 

HTML:

<leaflet 
width="100%" 
markers="markers" 
lf-center="center"> 

[注]我使用的傳單(版本: 「0.7.7」)和角瓣葉指令(版本:「0.10.0 「)。

回答

2

我的問題是剛剛加入單張地圖的data-tap-disabled="true"父標籤

+0

謝謝你回來,回答自己的問題,而不是讓它來解決。尊重++ –

+0

歡迎@CalebSwank – Kashif

相關問題