﻿
// virtual earth
var ve;
var blog__mapID;
var blog__latLong;
var blog__pushpinIcon;
function toggleMapVisibility(v) {
    Sys.UI.DomElement.setVisibilityMode($get(blog__mapID), Sys.UI.VisibilityMode.collapse);
    Sys.UI.DomElement.setVisible($get(blog__mapID), v);
    if (v) loadMap();
}
function loadMap() {
    ve = new VEMap(blog__mapID);
    ve.LoadMap(blog__latLong, 10, 'r', false);
    // pushpin
    var shape = new VEShape(VEShapeType.Pushpin, ve.GetCenter());
    shape.SetCustomIcon(blog__pushpinIcon);
    //ve.ClearInfoBoxStyles();
    shape.SetTitle("Cristian Merighi");
    shape.SetDescription("I'm here!");
    ve.AddShape(shape);
    //
    ve.AttachEvent("onobliqueenter", birdsEyeHandler);
}
function birdsEyeHandler() {
    if (ve.IsBirdseyeAvailable()) {
        ve.SetBirdseyeScene(blog__latLong);
    }
}
