﻿        var map = null;
        
        function GetMap() {
            map = new VEMap('myMap');
            map.LoadMap();
            document.getElementById('MSVE_obliqueNotification').innerHTML = "";
        }

        function AddPushpin() {
            var DBMCustomIcon = new VECustomIconSpecification();
            DBMCustomIcon.Image = "images/truck.ico";
            var DBMPushpin = new VEShape(VEShapeType.Pushpin, map.GetCenter());
            DBMPushpin.SetCustomIcon(DBMCustomIcon);
            map.AddShape(DBMPushpin);
        }
        
        function SetPushpinAfterFind(a, b, c, d, e) {
            AddPushpin();
        }
        
        function FindLoc(address) {
            try { map.Find(null, address, null, null, null, null, null, null, null, null, SetPushpinAfterFind); }
            catch (e) { alert(e.message); }
        }               