Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access map object in callback #257

Open
amirkhan81 opened this issue Aug 29, 2019 · 0 comments
Open

Access map object in callback #257

amirkhan81 opened this issue Aug 29, 2019 · 0 comments

Comments

@amirkhan81
Copy link

amirkhan81 commented Aug 29, 2019

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')
		};

	
    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant