Where do I implement this line of code in my current block?
size: new google.maps.Size(20, 20)
From what I was reading, you have to set the size in the variable. But I cant put that line of code in anywhere without breaking he function.
Here is my example array if needed:
["TITLE", "LAT", "LNG", "Z-INDEX", "CATEGORY"]
My current function that puts icons on my map:
function setMarkers(markers) {
deleteMarkers();
var iconBase =
'http://localhost:8090/HELPERSITE/images/map-categories/';
var icons = {
Contractor: {
icon: iconBase + 'Misc..png'
},
'Child Care': {
icon: iconBase + 'Misc..png'
},
'Misc.': {
icon: iconBase + 'Misc..png'
}
};
if (markers){
for (var i = 0; i < markers.length; i++) {
var w = markers[i];
var marker = new google.maps.Marker({
position: {lat: parseFloat(w[1]), lng: parseFloat(w[2])},
map: map,
icon: icons[w[4]].icon(),
title: w[0],
zIndex: parseFloat(w[3])
});
console.log(icons[w[4]]);
markerArray.push(marker);
}
}
}