I might be dense, but I'm trying to access the map object in a callback function with the hope of adding a circle around certain markers by category. As a PoC I've tried this but seems to do nothing. Any thoughts?
callbackMapSet: function(map, originPoint, originalZoom, myOptions) {
console.log('amir map ', map);
// Add circle overlay and bind to marker
function initMap() {
var circle = new google.maps.Circle({
center: {
lat: 44.878,
lng: -77.629
},
radius: 300,
strokeColor: "#E16D65",
strokeOpacity: 1,
strokeWeight: 3,
fillColor: "#E16D65",
fillOpacity: 1
});
circle.setMap(map);
console.log(circle.get() + 'amir')
};
},
I might be dense, but I'm trying to access the map object in a callback function with the hope of adding a circle around certain markers by category. As a PoC I've tried this but seems to do nothing. Any thoughts?
callbackMapSet: function(map, originPoint, originalZoom, myOptions) { console.log('amir map ', map); // Add circle overlay and bind to marker