Reputation: 11
<ui-gmap-google-map center="mapView.viewPort.center" zoom="mapView.viewPort.zoom" options="mapView.options">
<ui-gmap-markers fit="true" models="mapView.markers.notes" coords="'self'" idkey="'id'" doCluster="true" clusterOptions={maxZoom:20,averageCenter:true,styles:[{url:'http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m5.png',height:90,width:90},]} icon="'icon'">
<ui-gmap-windows templateUrl="'template'" templateParameter="'templateParam'">
</ui-gmap-windows>
</ui-gmap-markers>
</ui-gmap-google-map>
The mapView.markers.notes contains a json array consisting of information related to each note such as id, contents, etc.
I have tried this without using fit="true" and it works perfectly but I also want the map to adjust to view all the markers in first view so I need to use fit="true" also.
Upvotes: 0
Views: 207
Reputation: 11
The problem got solved by using an older version of angular google maps, it was an issue of version above 2.1.3 wherein it doesn't properly support more details in icon attribute than url. I have raised an issue corresponding to this on github, the url is:
https://github.com/angular-ui/angular-google-maps/issues/1785
Upvotes: 0