I want to add a map with a mark on my ASP.NET page, this code adds the map but not the point, what will I be doing wrong?
function CreateMapGoogle() {
var atrMap = {
center: new google.maps.LatLng(40.712449, -74.001508),
zoom: 14,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("idgoogleMap"), atrMap);
var myLatLng = { lat: 40.712449, lng: -74.001500};
var i=0;
var marker = new google.maps.Marker({
map: map,
animation: google.maps.Animation.DROP,
icon: 'x.png',
title: 'MI TITULO',
position: myLatLng
});
marker.setMap(map);
(function (marker, i) {
google.maps.event.addListener(marker, 'click', function () {
infowindow = new google.maps.InfoWindow({ maxWidth: 250 });
infowindow.setContent('MI UBICACION NOMBRE');
infowindow.open(map, marker);
});
})(marker, i);
}