You must Sign In to post a response.
  • Category: ASP.NET

    Internet explorer : shows google maps error showing using javascript in asp.net

    shows error in internet explorer "JavaScript runtime error: 'google' is undefined"

    and my code is----------

    <script type="text/javascript">
    function initialize1() {

    var myCenter = new google.maps.LatLng(51.508742, -0.120850);
    var mapProp = {
    center: myCenter,
    zoom: 12,
    mapTypeId: google.maps.MapTypeId.ROADMAP
    };

    var map = new google.maps.Map(document.getElementById("map"), mapProp);

    var marker = new google.maps.Marker({
    position: myCenter,
    animation: google.maps.Animation.BOUNCE
    });

    marker.setMap(map);

    var infowindow = new google.maps.InfoWindow({
    content: "Hello World!"
    });

    google.maps.event.addListener(marker, 'click', function () {
    infowindow.open(map, marker);
    });
    }
    window.onload = initialize1;
    </script>
  • #763138
    Hi,

    Have you referenced the respective api for the same?

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/


Sign In to post your comments