function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gauri Kasat 8Gauri Kasat 8 

When the location marker is clicked in the Google map,maximize google map to show the location. How to do this? Please help.

devedeve
Hi Gauri,

You can add listener on click of marker like this:-

       marker.addListener('click', function() {
          map.setZoom(8);
          map.setCenter(marker.getPosition());
        });
Gauri Kasat 8Gauri Kasat 8
hey ,
thank you so much for response. but  i want "full screen google map to show the location when the location marker is clicked in the google map." 
can you please help with that?
devedeve
You can do full screen map on click of marker like this

 marker.addListener('click', function() {
     var myMap = document.getElementById('map-canvas');
     myMap.style.height = 100%;
     myMap.style.width = 100%;
}
Gauri Kasat 8Gauri Kasat 8
This also didn't work for me
devedeve
I think you can do this by reducing the zoom level as per your requirement