I have added a KmlLayer on Google Maps using the following code.
var ctaLayer = new google.maps.KmlLayer('https://sites.google.com/site/.../file.kmz');
ctaLayer.setMap(map);
google.maps.event.addListener(ctaLayer, 'click', function (kmlEvent) {
alert(kmlEvent.featureData.name);
});
I could supress the infowindow sucessfully by the following code. (kmlOptions is passed to ctaLayer object with the url)
var kmlOptions = {
suppressInfoWindows: true,
preserveViewport: false,
map: map
};
Now my requirement is that I should be able to pass some colour or some style in the script to change the color of KMLLayer which I created. (Like I suppressed the InfoWindow)
Actually I want to change the color of polygon (the district or area) in the KMLLayer on a mouse click or mouse hover
Please anyone give a solution for this one..
Thanks in advance
It working fine: