﻿
$(document).ready(function() { app.init(); });

var app = {

    map: null,
    slat: 45.4723455,
    slng: 9.2084094,
    szoom: 16,
    
    curType: '',

    init: function() {
        app.initMap();
    },

    unLoad: function() { GUnload(); },

    initMap: function() {

        if (!this.map) {
            if (GBrowserIsCompatible()) {

                this.map = new GMap2($('#map-contact').get(0));

                /* Initialize an empty map and the controller */
                this.map.setCenter(new GLatLng(this.slat, this.slng), this.szoom);
                this.map.addControl(new GLargeMapControl3D());
                this.map.addControl(new GScaleControl());
                this.map.clearOverlays();

                var myIcon = new GIcon();

                myIcon.image = '/images/pushpin/minerva-80.png';
                myIcon.iconSize = new GSize(80, 88);
                myIcon.iconAnchor = new GPoint(40, 88);
                myIcon.shadow = '/images/pushpin/minerva-80_shadow.png';
                myIcon.shadowSize = new GSize(120, 88);
                var point = new GLatLng(45.4723455, 9.2084094);

                var marker = new GMarker(point, { draggable: false, icon: myIcon });
                this.map.addOverlay(marker);

            }
        }
    }

};


