var msvemap = null;

function initBirdsEye () {

    msvemap = new VEMap('birdseye-container');
    msvemap.LoadMap(point, 18);

    msvemap.AttachEvent("onobliqueenter", OnObliqueEnterHandler);

    AddMarker(point);

    //msvemap.SetMapMode(VEMapMode.Mode3D);
    //msvemap.Show3DBirdseye(true);

}

function AddMarker(point) {
    var marker = new VEShape(VEShapeType.Pushpin, point);
    marker.SetCustomIcon('/idx/img/map-icons/house-icon.png');
    //marker.SetTitle('');
    //marker.SetDescription('');
    msvemap.AddShape(marker);
}

function OnObliqueEnterHandler() {
     if (msvemap.IsBirdseyeAvailable()) {
          msvemap.SetMapStyle(VEMapStyle.BirdseyeHybrid);
          msvemap.DetachEvent("onobliqueenter", OnObliqueEnterHandler);
     }
}

function DisposeMap() {
    if (msvemap != null) {
        msvemap.Dispose();
    }
}

$(document).ready(function () {
    initBirdsEye();
});
//window.onload = initBirdsEye;
window.onunload = DisposeMap;
