i have to make a map for a company and i have to put the company logo on one marker, and a container icon on 10 others markers but i don' t know how to do it: this is my current code : ( so i have the first marker with my logo but its a personal image so can't see the marker ) do i have to make a new variable like "marker2" ? and make new variables for each position of the icons ?
var nice = new google.maps.LatLng(43.7101728,7.2619532);
var centre = new google.maps.LatLng(43.7101728,7.2619532);
var marker;
var map;
function initialize() {
var mapOptions = {
zoom: 14,
center: nice,
};
map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
marker = new google.maps.Marker({
map:map,
draggable:false,
animation: google.maps.Animation.DROP,
position: centre,
icon:'image/abi06B.png'
});
google.maps.event.addListener(marker, 'click', toggleBounce);
}
function toggleBounce() {
if (marker.getAnimation() != null) {
marker.setAnimation(null);
} else {
marker.setAnimation(google.maps.Animation.BOUNCE);
}
}
google.maps.event.addDomListener(window, 'load', initialize);
#map-canvas {
position: absolute;
height: 100%;
width:100%;
}
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
<div id="map-canvas">
</div>