1

最近 angular-google-maps を 2.0.12 にアップグレードしましたが、マーカーをクリックしてもカスタム テンプレート (ウィンドウ用) が読み込まれません。以前は正常に動作していました。すべてのドキュメントと変更ログを参照しましたが、役に立ちませんでした (これが、最初にマーカーを機能させた方法です)。誰かがこれを修正するのを手伝ってくれますか?

これが私のhamlビューです:

%ui-gmap-google-map(center='map.center' pan='map.pan' options='map.options' draggable='true' zoom='map.zoom')
  %ui-gmap-markers(models='map.markers' icon="'icon'" coords="'self'" click="'click'" events="'events'")
    %ui-gmap-windows(show="'showWindow'" closeClick="'closeClick'" isIconVisibleOnClick="'isIconVisibleOnClick'" options='map.infoWindowCustomClass.options' templateUrl="'templateUrl'" templateParameter="'templateParameter'")

そして、ここにマーカーモデルをプッシュする私のcoffeescriptコードがあります:

$scope.map.markers.push
                id:index
                icon:'images/ignore/marker.png'
                latitude: latlongs[index].latitude
                longitude: latlongs[index].longitude
                showWindow:false,
                templateUrl:'views/maptooltip.html'
                appName:latlongs[index].app
                userName:latlongs[index].usr
                city:latlongs[index].city
                country:latlongs[index].country
                click:()->
                  $scope.map = mapSettings.setMapCenter({
                      latitude:this.model.latitude-30
                      longitude:0
                    })
                  this.model.showWindow = true
                  this.model.templateParameter={}
                  this.model.templateParameter.appName = this.model.appName;
                  this.model.templateParameter.userName = this.model.userName;
                  this.model.templateParameter.city = this.model.city;
                  this.model.templateParameter.country = this.model.country;
                  $scope.$apply()
                closeClick:()->
                  this.model.showWindow = false
                  $scope.$apply()

そして、ここに私のマップオブジェクトがあります:

      zoom: 2
      pan:true
      center: 
        latitude: 40
        longitude: 0
      infoWindowCustomClass:
        options:
          boxClass:'dashboard-new-tooltip'
      options:
          minZoom:2
          maxZoom:11
          disableDefaultUI:true
          styles:[{
                    "featureType": "water",
                    "stylers": [
                      { "color": "#1B2028" }
                    ]
                  },{
                    "featureType": "poi",
                    "stylers": [
                      { "visibility": "off" }
                    ]
                  },{
                    "featureType": "road",
                    "stylers": [
                      { "visibility": "off" }
                    ]
                  }
                  ,{
                    "elementType": "labels",
                    "stylers": [
                      { "visibility": "off" }
                    ]
                  },{
                    "featureType": "transit",
                    "elementType": "all",
                    "stylers": [
                      { "visibility": "off" }
                    ]
                  },{
                    "featureType": "administrative",
                    "stylers": [
                      { "visibility": "off" }
                    ]
                  },{
                    "featureType": "landscape",
                    "stylers": [
                      { "color": "#4e555f" }
                    ]
                  }]
4

0 に答える 0