I am asked to show a custom icon of the company in the maps. I have been googling and found out that RichMarker can do that as suggested here
The following is what I have already tried:
if (GoogleMap === false) {
console.log(GoogleMap);
$.getScript("https://maps.google.com/maps/api/js?key=MyKey&sensor=false&libraries=places,geometry")
.done(function (script, textStatus) {
initializeGoogleMap();
GoogleMap = true;
});
}else{
initializeGoogleMap();
}
}
function initializeGoogleMap(){
var myLoc, map;
myLoc = {lat: 34.640765, lng: 50.874745};
map = new google.maps.Map(document.getElementById('map'), {
zoom: 16,
center: myLoc
});
var Marker = new google.maps.RichMarker({
position: myLoc,
map: map,
content: "<i class='WMi-check'></i>"
});
}
But I get nothing in the map. Please Help.