Having trouble displaying a custom icon instead of the default one on my map.
html
<ui-gmap-google-map center="vm.map.center" zoom="vm.map.zoom" options="options">
<ui-gmap-marker icon="vm.options.icon" coords="vm.marker.coords" events="vm.marker.events" idkey="vm.marker.id">
</ui-gmap-marker>
</ui-gmap-google-map>
controller
var vm = this;
vm.map = {
center: {
latitude: 43.6042600,
longitude: 1.4436700
},
zoom: 10
};
vm.options = {icon:'images/location.png'};
vm.coordsUpdates = 0;
vm.dynamicMoveCtr = 0;
vm.marker = {
id: 0,
coords: {
latitude: 43.6042600,
longitude: 1.4436700
},
events: {
dragend: function(marker, eventName, args) {
var lat = marker.getPosition().lat();
var lon = marker.getPosition().lng();
$log.log(lat);
$log.log(lon);
vm.marker.options = {
draggable: false,
labelContent: "",
labelAnchor: "100 0",
labelClass: "marker-labels"
};
}
}
};