google-maps
  • markerclusterer
  • angular-google-maps
  • 2016-03-21 11 views 0 likes 
    0

    私は自分のグーグルマップにマーカーのリストを持っています。マップ内にクラスターを作成することができます。しかし、問題は青色のクラスタアイコンの代わりに、私自身のアイコンを使いたいということです。角のGoogleマップでマーカークラスターのアイコン画像を変更するにはどうすればよいですか?

    これは私のコードです:

     <section class="col-sm-9 mapContainer"> 
          <ui-gmap-google-map id="mapDiv" center='map.center' zoom='map.zoom'> 
           <ui-gmap-markers fit="map.fitProperty" models="markers|filter:filterSite" coords="'self'" type="'cluster'" icon="'icon'"> 
            <info-window></info-window> 
           </ui-gmap-markers> 
          </ui-gmap-google-map> 
         </section> 
    

    誰もがこの上で私を助けることができますか?

    答えて

    0

    Angular Google Mapには、markerclusterのアイコンが5つあります。 .../m1.png - >.../m5.pngなどです。 m1.pngアイコンhere!

    設定をclusterOptions="{imagePath: 'yourImagesPath/m'}"で更新できます。

    m1.png - >m5.pngが画像フォルダに存在することを確認してください。

    あなたのコードは次のようになります。

    <ui-gmap-google-map id="mapDiv" center='map.center' zoom='map.zoom'> 
        <ui-gmap-markers fit="map.fitProperty" models="markers|filter:filterSite" coords="'self'" type="'cluster'" icon="'icon'" clusterOptions="{imagePath: 'yourImagesPath/m'}"> 
        <info-window></info-window> 
        </ui-gmap-markers> 
    </ui-gmap-google-map> 
    
    関連する問題