Hi
I have images to overlay on google maps by using checkboxes. I made this script to not create the separate individual script for each overlay but it returns the error of proprty not supported in main.js of google maps api. However, i tried getting the output value in javascript alert and it returns the values as expected. Could anyone help please?
Here is the script.
function shImg(url,lat,lng) {
                var lat_ = "new GLatLng(" + lat + ")";
                var lng_ = "new GLatLng(" + lng + ")";
                var latlng = lat_ + ", " + lng_;
                var ticked_ = document.getElementById(url);
                var boundaries_ = "new GLatLngBounds(" + latlng + ")";
                var imgurl_ = "http://www.mywebsite.com/" + url + ".jpg";
                imageOverlay_ = new GGroundOverlay(imgurl_, boundaries_);
                map.addOverlay(imageOverlay_);
    if (!ticked_.checked)   {
                map.clearOverlays();
            //  imageOverlay_=null;
    }
        else {
                                alert(boundaries_);
                imageOverlay_.show();
} }