﻿// JScript File

 var myMap = null;
 
 var confidenceStrings = ["High", "Medium", "Low"];
 var precisionStrings  = ["Interpolated", "Rooftop"];

 var pushpinUrls       = ["pushpinGreen.gif", "pushpinOrange.gif", "pushpinRed.gif"];

 function LoadMap(lat, lon, name, phone)
 {
    myMap = new VEMap("myMap");
    myMap.LoadMap(new VELatLong(39.81055329445763,-86.15918905869407), 10);
    
    var pin = new VEShape(VEShapeType.Pushpin, new VELatLong(lat, lon));
    pin.SetTitle(name);
    pin.SetDescription(phone);
    myMap.AddShape(pin);    
 }

 function LoadMap2()
 {
    myMap = new VEMap("myMap");
    myMap.LoadMap(new VELatLong(39.81055329445763,-86.15918905869407), 10);
    InsertPushpins();    
 }
 
 function InsertPushpin(lat, lon, name, description, ind, type)
 {
//    var pin = new VEShape(VEShapeType.Pushpin, new VELatLong(lat, lon));
//    pin.SetTitle(name);
//    pin.SetDescription(description);
//    myMap.AddShape(pin);    
    
    
    var shape = new VEShape(VEShapeType.Pushpin,new VELatLong(lat, lon)); 
    if (type == 'r')
        shape.SetCustomIcon("<div class='pinStyle1'><div class='text'>" + ind + "</div></div>"); 
    else
        shape.SetCustomIcon("<div class='pinStyle2'><div class='text'>" + ind + "</div></div>"); 
    shape.SetTitle(name);
    shape.SetDescription(description);
    myMap.AddShape(shape);
 }

 function UnloadMap()
 {
    if (myMap != null) {
       myMap.Dispose();
    }
 }

