﻿$(document).ready(function() {


    var myLatlng = new google.maps.LatLng(GMapLat, GMapLng);
    var myOptions = {
        zoom: GMapZoom,
        center: myLatlng,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        navigationControl: true,
        mapTypeControl: false,
        scaleControl: false
    };

    var map = new google.maps.Map($("*[id$='GMap']").get(0), myOptions); //the $ method gives a jQuery object that is always an array of Elements so to get the real DOM element you have to use $("#myElementId").get(0)

    //http://code.google.com/apis/maps/documentation/v3/overlays.html
    var marker = new google.maps.Marker({
        position: myLatlng,
        map: map,
        title: "th1ng"
    });
});

