The following is my asp.net code for a webpage. The intellisense is NOT picking up any of the google api commands. ie, the google in new google.maps…… is squiggly lined and the map doesnt show on the page. Yes i have a width and height set. Where am I going wrong?
<asp:Content ID="Content1" ContentPlaceHolderID="MidPageContent" runat="server" onload="initialize">
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCjtIboyk_zcd4SoE9fzNoGNzt_tIqG8jY&sensor=false">
</script>
<script type="text/javascript">
function initialize() {
var latLng = new google.maps.LatLng(-34.397, 150.644);
var map = new google.maps.Map(document.getElementById('GMap'), {
zoom: 8,
center: latLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var marker = new google.maps.Marker({
position: latLng,
title: 'Point A',
map: map,
draggable: true
});
</script>
<div id="GMap" style="width:400px; height:400px;" >
Sorry about the width, now it’s another simple question, are you calling
initialize()through<body onloadorgoogle.maps.event.addDomListener(window, 'load', initialize);