var map = null;


function LoadRoscreaManMap()
{
    // Load the Map
    map = new VEMap("myMap");
   
    map.LoadMap(new VELatLong(52.863948354962105, -8.203697204589849),10);
   
    // Attach our onclick map event handler
    map.AttachEvent("onclick", Map_Click);
    
    var points = [
     
     
     new VELatLong(52.96340017622272, -7.794048786163336),
     
     new VELatLong(52.96112540550324, -7.794638872146591),
     
     new VELatLong(52.959903959340416, -7.795883417129528),
     
     new VELatLong(52.95887636679612, -7.796055078506455),
     
     new VELatLong(52.9577065619121, -7.797632217407237),
         
     
     
     new VELatLong(52.957984474225796, -7.798447608947771),

     
     new VELatLong(52.95797154811128, -7.799456119537352),
     
          new VELatLong(52.957984474225796, -7.798447608947771),

          new VELatLong(52.9577065619121, -7.797632217407237),

   
     
     
     
     

    
     new VELatLong(52.95697622568969, -7.79881238937378),


     
     new VELatLong(52.95512770898246, -7.799241542816151),

     
     new VELatLong(52.953809138294034, -7.801280021667465),
     
     new VELatLong(52.9524388163527, -7.803812026977545),
          
     new VELatLong(52.95221904369946, -7.8040266036987465),
     
     
     new VELatLong(52.952723226363865, -7.808618545532229),
     
     new VELatLong(52.95221904369946, -7.8040266036987465),

     
    
    // abbey st
    
    new VELatLong(52.952464671885544, -7.803769111633304),
    new VELatLong(52.952361249661436, -7.802503108978282),
    new VELatLong(52.95271029867666, -7.800099849700924),
    new VELatLong(52.95293006883362, -7.798576354980458),
    new VELatLong(52.953214475614324, -7.7981901168823295),
    new VELatLong(52.953602300028486, -7.795057296752917),
    new VELatLong(52.95395133902775, -7.7928900718688805),
    new VELatLong(52.954035366514276, -7.791806459426897),
    new VELatLong(52.95365400968761, -7.789113521575932),
    new VELatLong(52.95355059030752, -7.788040637969958),
    new VELatLong(52.95358937260405, -7.787783145904549),
    new VELatLong(52.9541711028784, -7.787375450134264),
    new VELatLong(52.95453306443329, -7.7869892120361355),
    new VELatLong(52.955269905380646, -7.787396907806385),
    new VELatLong(52.956989152101734, -7.787911891937271),


// return to limerick road


    new VELatLong(52.955269905380646, -7.787396907806385),
    new VELatLong(52.95453306443329, -7.7869892120361355),
    new VELatLong(52.9541711028784, -7.787375450134264),
    new VELatLong(52.95358937260405, -7.787783145904549),
    new VELatLong(52.95355059030752, -7.788040637969958),
    new VELatLong(52.95365400968761, -7.789113521575932),
    new VELatLong(52.954035366514276, -7.791806459426897),
    new VELatLong(52.95395133902775, -7.7928900718688805),
    new VELatLong(52.953602300028486, -7.795057296752917),
    new VELatLong(52.953214475614324, -7.7981901168823295),
    new VELatLong(52.95293006883362, -7.798576354980458),
    new VELatLong(52.95271029867666, -7.800099849700924),
    new VELatLong(52.952361249661436, -7.802503108978282),
    new VELatLong(52.952464671885544, -7.803769111633304),

    
    
    
     
     
     new VELatLong(52.948275873989615, -7.809884548187251),

     
     
     //bypass
      new VELatLong(52.947978505632, -7.809519767761242),
      new VELatLong(52.94733204562818, -7.804412841796877),
      new VELatLong(52.94673729389204, -7.800271511077884),
      new VELatLong(52.946776082298, -7.798125743865968),

      // mc donals roundabout
      new VELatLong(52.94693123557403, -7.7965807914733824),
      new VELatLong(52.947241540456694, -7.7964735031127805),
      
      
      // back into town - east side
      new VELatLong(52.94783628526006, -7.797224521636954),
      new VELatLong(52.948818889193866, -7.7978467941284055),
      
      new VELatLong(52.95055132070596, -7.797524929046638),
      
      new VELatLong(52.95159850312094, -7.797374725341794),
      
      new VELatLong(52.95259394931792, -7.797782421112046),
      
      new VELatLong(52.953052881081994, -7.79838323593141),
      
      new VELatLong(52.95326618573715, -7.798072099685684),
      
      new VELatLong(52.95412585747102, -7.7975142002105615),
      
      new VELatLong(52.95503075662471, -7.79706358909607),
      
      new VELatLong(52.955011366127096, -7.796387672424302),
      
      new VELatLong(52.95582575954188, -7.795679569244369),

      new VELatLong(52.956239413815666, -7.794005870819095),
      
      
      new VELatLong(52.95701500491422, -7.787890434265149),
      
      new VELatLong(52.95771302500945, -7.7822256088256925),
      
      new VELatLong(52.95804910474044, -7.777719497680658)


      
      
      

      
      
      
    ];
    
    var color = new VEColor(255,0,0,1);
    var width = 5;
    var id = 'I70';
    
    var poly = new VEPolyline(id, points, color, width);
    map.AddPolyline(poly);
    map.SetMapView(points);
}



function LoadTemplemoreManMap()
{
    // Load the Map
    map = new VEMap("myMap");
   
    map.LoadMap(new VELatLong(52.863948354962105, -8.203697204589849),10);
   
    // Attach our onclick map event handler
    map.AttachEvent("onclick", Map_Click);
    
    var points = [
      new VELatLong(52.79257683735415, -7.8439593315124405),
      new VELatLong(52.79017630291369, -7.8441309928894025),
      new VELatLong(52.79007249303105, -7.840332984924333),
      new VELatLong(52.790656420398776, -7.840139865875253),
      new VELatLong(52.791318195274236, -7.840139865875253),
      new VELatLong(52.79260278835408, -7.837049961090081),
      new VELatLong(52.79260278835408, -7.837028503417962),
      new VELatLong(52.79260278835408, -7.837049961090081),
      new VELatLong(52.79487344090735, -7.831835746765148),
      new VELatLong(52.78811303503399, -7.82293081283568)
    ];
    
    var color = new VEColor(255,0,0,1);
    var width = 5;
    var id = 'I70';
    
    var poly = new VEPolyline(id, points, color, width);
    map.AddPolyline(poly);
    map.SetMapView(points);
}
   
         
function LoadManMap()
{
    // Load the Map
    map = new VEMap("myMap");
    //map.LoadMap();
   
   
    map.LoadMap(new VELatLong(52.863948354962105, -8.203697204589849),10);
   
   //http://www.bing.com/maps/?v=2&cp=52.94277877402171~-7.950919151041006&lvl=10&sty=r&cid=B7A104610E6B3506!123
   
    //map.LoadMap( new VELatLong(52.8, -8.1), 6);

   
   
    // Attach our onclick map event handler
    map.AttachEvent("onclick", Map_Click);
    
    

    

    
    var points = [
    
    
    //Limerick Road roundabout
    
      new VELatLong(52.85532971403841, -8.235594034194957),
      
   //bypass
   
   new VELatLong(52.85710799543405, -8.237149715423585),

      
      new VELatLong(52.85784811475977, -8.237734436988802),
      
      
      new VELatLong(52.858529920299546, -8.238276243209844),

      
      new VELatLong(52.85948540172537, -8.238785862922657),
      
      new VELatLong(52.86098174053444, -8.239156007766737),

      
      
      new VELatLong(52.862316094391645, -8.239102363586422),
      
      
      new VELatLong(52.8642463006613, -8.23813676834108),
      
      
      new VELatLong(52.86659093236974, -8.235712051391601),
      
      new VELatLong(52.86878648088188, -8.233062028884877),
      
      new VELatLong(52.869000200908665, -8.232836723327633),
      
      new VELatLong(52.8704897354895, -8.231098651885998),
      
      new VELatLong(52.87078763626816, -8.2308518886566),
      
      new VELatLong(52.87111143914198, -8.230669498443596),

      new VELatLong(52.87121829355991, -8.23035836219787),

new VELatLong(52.8709560140642, -8.227686882019059),
new VELatLong(52.871972743020514, -8.228040933609026),
new VELatLong(52.87216054385078, -8.226571083068845),
new VELatLong(52.871972743020514, -8.228040933609026),
new VELatLong(52.8709560140642, -8.227686882019059),

	new VELatLong(52.8708847773841, -8.226463794708244),



	new VELatLong(52.871001346436074, -8.225315809249865),
// Gortlanroe 	
	
	new VELatLong(52.87115029532441, -8.224242925643924),



	
	new VELatLong(52.871176199426685, -8.223652839660635),
	
	new VELatLong(52.8709560140642, -8.222161531448366),



	
	new VELatLong(52.8704573548468, -8.219500780105601),
	
	new VELatLong(52.870081737625156, -8.217473030090328),
	
	new VELatLong(52.86960897339567, -8.215874433517457),






	
	new VELatLong(52.86916858564275, -8.2148551940918),
	
	new VELatLong(52.86883181552101, -8.213932514190666),

	new VELatLong(52.86794454325982, -8.21129322052002),





// St Conlons Road

new VELatLong(52.86762071674662, -8.210477828979486),

new VELatLong(52.867432896261434, -8.209748268127434),

new VELatLong(52.86681761656338, -8.208632469177253),

new VELatLong(52.86602097830728, -8.207420110702512),


new VELatLong(52.865548169823626, -8.206915855407706),

new VELatLong(52.864693215373975, -8.20615410804749),

new VELatLong(52.86433050233593, -8.205703496933001),

new VELatLong(52.864110282226356, -8.20561766624452),

// Ashe Road

new VELatLong(52.864064942653265, -8.205306529998795),

new VELatLong(52.86420743829483, -8.204180002212535),

new VELatLong(52.8646057759011, -8.200333714485154),

new VELatLong(52.86458634488321, -8.199904561042783),

new VELatLong(52.86501706373854, -8.199684619903578),

new VELatLong(52.86548987800995, -8.199620246887216),

new VELatLong(52.86563884582256, -8.199655115604416),

// O Rahilly

new VELatLong(52.86596592552972, -8.19975167512894),

new VELatLong(52.86620232813934, -8.199824094772342),

new VELatLong(52.86706372948972, -8.199858963489541),

new VELatLong(52.86744584942445, -8.200140595436106),

new VELatLong(52.867902445949795, -8.200591206550596),


new VELatLong(52.868295892292565, -8.200854063034043),


new VELatLong(52.868375228777104, -8.200934529304518),

new VELatLong(52.8686537148805, -8.201347589492806),


new VELatLong(52.86907144068362, -8.201723098754893),

new VELatLong(52.8686537148805, -8.201347589492806),

// st josephs park

new VELatLong(52.86933049342453, -8.199486136436458),

new VELatLong(52.86989068968702, -8.198128938674916),

new VELatLong(52.870389355418474, -8.197018504142772),


// northville

new VELatLong(52.87066782859225, -8.196229934692398),

new VELatLong(52.87026630856292, -8.196074366569517),

new VELatLong(52.870059070964636, -8.196026086807238),

// summerhill

new VELatLong(52.86983887993165, -8.196020722389235),

new VELatLong(52.869534496369205, -8.196036815643315),

// brickfields
new VELatLong(52.86904391623898, -8.196079730987557),
new VELatLong(52.86958630648811, -8.193679153919234),
new VELatLong(52.870389355418474, -8.190398812294018),
new VELatLong(52.86958630648811, -8.193679153919234),
new VELatLong(52.86904391623898, -8.196079730987557),



new VELatLong(52.869042297153456, -8.196087777614563),

new VELatLong(52.86867962047365, -8.196026086807238),




new VELatLong(52.86793806675324, -8.195736408233633),




//new VELatLong(52.869045535324446, -8.196052908897398),
//new VELatLong(52.870389355418474, -8.190398812294018),
//new VELatLong(52.869045535324446, -8.196052908897398),




new VELatLong(52.86740051333698, -8.195559382438668),

new VELatLong(52.866973056468765, -8.195559382438668),

new VELatLong(52.86657797895147, -8.19561302661895),

new VELatLong(52.86628004926387, -8.195720314979551),

new VELatLong(52.86600478632113, -8.195891976356513),

new VELatLong(52.864942578828725, -8.196728825569167),

new VELatLong(52.8645620560986, -8.197200894355777),


// out to lisbunny
new VELatLong(52.86455881759296, -8.19436311721801),
new VELatLong(52.86462196840938, -8.192960321903225),
new VELatLong(52.864855139858406, -8.191187381744391),
new VELatLong(52.86552226236055, -8.187743425369255),
new VELatLong(52.86563884582256, -8.187056779861443),
new VELatLong(52.865735998468246, -8.185157775878892),
new VELatLong(52.866014501513554, -8.182936906814571),
new VELatLong(52.866001547923176, -8.182035684585558),

new VELatLong(52.86722888343382, -8.180860877037053),

new VELatLong(52.867737294569835, -8.180437088012688),

new VELatLong(52.86722888343382, -8.180860877037053),

//return from lisbunny
new VELatLong(52.866001547923176, -8.182035684585558),
new VELatLong(52.866014501513554, -8.182936906814571),
new VELatLong(52.865735998468246, -8.185157775878892),
new VELatLong(52.86563884582256, -8.187056779861443),
new VELatLong(52.86552226236055, -8.187743425369255),
new VELatLong(52.864855139858406, -8.191187381744391),
new VELatLong(52.86462196840938, -8.192960321903225),
new VELatLong(52.86455881759296, -8.19436311721801),
//new VELatLong(52.86562913054601, -8.196181654930118),
//new VELatLong(52.865438062998734, -8.196299672126763),
//new VELatLong(52.86530204829982, -8.196433782577521),


new VELatLong(52.864566913856606, -8.197192847728734),
new VELatLong(52.864547482821294, -8.19723308086394),
new VELatLong(52.86410704368698, -8.197866082191469),
new VELatLong(52.863885203165246, -8.198096752166751),




//ashe rd
new VELatLong(52.86433859864219, -8.199220597743973),
new VELatLong(52.86458310637938, -8.199899196624745),
new VELatLong(52.86433859864219, -8.199220597743973),
new VELatLong(52.863885203165246, -8.198096752166751),


//pearse st

new VELatLong(52.863483620357684, -8.198601007461558),

new VELatLong(52.86308689175707, -8.199126720428452),

new VELatLong(52.86281484719158, -8.199529051780697),

new VELatLong(52.862698256141385, -8.19976508617402),

new VELatLong(52.86249422104972, -8.200167417526231),

new VELatLong(52.862267514267074, -8.200800418853758),

new VELatLong(52.86192745187221, -8.201508522033691),

//KENYON ST
new VELatLong(52.86281484719158, -8.199507594108578),
new VELatLong(52.86243106713644, -8.19903820753097),
new VELatLong(52.861091858668246, -8.197286725044257),
new VELatLong(52.860834376124046, -8.196680545806886),
// rounabout
new VELatLong(52.86074369008431, -8.19667518138885),
new VELatLong(52.86068377241836, -8.196484744548803),
new VELatLong(52.86069672759638, -8.196404278278361),
new VELatLong(52.860510496540435, -8.196195065975198),
//tyone
new VELatLong(52.860249771719395, -8.195720314979551),
new VELatLong(52.859820624969295, -8.195001482963576),
new VELatLong(52.85921009567543, -8.194234371185288),
new VELatLong(52.858795513857814, -8.193858861923201),
new VELatLong(52.85683591338435, -8.192195892333972),

// back to start of kenyon st
new VELatLong(52.858795513857814, -8.193858861923201),
new VELatLong(52.85921009567543, -8.194234371185288),
new VELatLong(52.859820624969295, -8.195001482963576),
new VELatLong(52.860249771719395, -8.195720314979551),
new VELatLong(52.860510496540435, -8.196195065975198),
new VELatLong(52.86069672759638, -8.196404278278361),
new VELatLong(52.86068377241836, -8.196484744548803),
new VELatLong(52.86074369008431, -8.19667518138885),
new VELatLong(52.860834376124046, -8.196680545806886),
new VELatLong(52.861091858668246, -8.197286725044257),
new VELatLong(52.86243106713644, -8.19903820753097),
new VELatLong(52.86281484719158, -8.199507594108578),

// silver st
new VELatLong(52.86177847131685, -8.201760649681094),

new VELatLong(52.86135419780234, -8.202227354049668),

new VELatLong(52.86100927009409, -8.202584087848668),


// william st

new VELatLong(52.86121817030116, -8.202876448631277),

new VELatLong(52.861836768116824, -8.203608691692364),

new VELatLong(52.862261036913026, -8.204083442687977),


// limerick road
new VELatLong(52.863323310053765, -8.204963207244871),


// roundabout 1
new VELatLong(52.86307393729263, -8.20607364177705),
new VELatLong(52.86294115380911, -8.20608973503113),
new VELatLong(52.862912006160784, -8.206298947334293),


new VELatLong(52.86298649455649, -8.206422328948976),

new VELatLong(52.86269177885165, -8.20777416229248),




new VELatLong(52.862646437796315, -8.208004832267763),

new VELatLong(52.86198250977411, -8.210021853446958),

new VELatLong(52.86167483236797, -8.211432695388783),

new VELatLong(52.861506418548075, -8.212972283363331),

new VELatLong(52.861394682095344, -8.21422487497331),

new VELatLong(52.861248938463746, -8.21545332670213),



new VELatLong(52.861046515941105, -8.216359913349148),



new VELatLong(52.860863525168014, -8.217065334320077),

new VELatLong(52.86087162212119, -8.21708142757416),


new VELatLong(52.86043114567378, -8.2193586230278),

// roundabout 2
new VELatLong(52.86038256343891, -8.220144510269172),
new VELatLong(52.860285398806, -8.220241069793695),
new VELatLong(52.86029511527907, -8.220509290695181),

// back on the limerick road!

new VELatLong(52.860094307726584, -8.220984041690826),
new VELatLong(52.859959895700506, -8.221354186534874),
new VELatLong(52.859352607260504, -8.22345435619355),
new VELatLong(52.85882466427131, -8.225272893905625),
new VELatLong(52.85779143210675, -8.228936791419968),
new VELatLong(52.857337968217315, -8.230428099632268),
new VELatLong(52.856414830659105, -8.232622146606431),
new VELatLong(52.85553054363797, -8.234478235244743),

// roundabout 3
new VELatLong(52.85524225569653, -8.23507368564607),
new VELatLong(52.85531999645358, -8.235312402248393),
new VELatLong(52.85528436529054, -8.235551118850717),
new VELatLong(52.85533457283001, -8.235594034194957)




































      
      
      
      
      
      
      
      
      
      
    ];
    
    var color = new VEColor(255,0,0,1);
    var width = 5;
    var id = 'I70';
    
    var poly = new VEPolyline(id, points, color, width);
    map.AddPolyline(poly);
map.SetMapView(points);
     
    
    
    
}








function LoadMap()
{
    // Load the Map
    map = new VEMap("myMap");
    //map.LoadMap();
   
    map.LoadMap(new VELatLong(52.8, -8.1),2);
   
   //http://www.bing.com/maps/?v=2&cp=52.94277877402171~-7.950919151041006&lvl=10&sty=r&cid=B7A104610E6B3506!123
   
    //map.LoadMap( new VELatLong(52.8, -8.1), 6);

   
   
    // Attach our onclick map event handler
    map.AttachEvent("onclick", Map_Click);
    
    

    

    // FWI
    var circle =   CreateCircle(new VELatLong(53.01313084591287, -8.127136230468766), 6, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetLineColor(new VEColor(255,48,48,1.0));
    map.AddShape(circle);


    // FWI
    var circle =   CreateCircle(new VELatLong(52.91345696284071, -8.18687438964844), 3, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetLineColor(new VEColor(255,48,48,1.0));
    map.AddShape(circle);



    // Echo IT
    var circle =   CreateCircle(new VELatLong(52.86622823519631, -8.199234008789053), 6, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetLineColor(new VEColor(255,255,0,1.0));
    map.AddShape(circle);


    // Echo IT
    var circle =   CreateCircle(new VELatLong(52.86622823519631, -8.199234008789053), 6, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetLineColor(new VEColor(255,255,0,1.0));
    map.AddShape(circle);


    // Echo IT
    var circle =   CreateCircle(new VELatLong(52.77867785295501, -8.017272949218751), 6, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetLineColor(new VEColor(255,255,0,1.0));
    map.AddShape(circle);


    // Echo IT
    var circle =   CreateCircle(new VELatLong(52.681377687137406, -7.815399169921868), 6, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetLineColor(new VEColor(255,255,0,1.0));
    map.AddShape(circle);


    // Premier broadband
    var circle =   CreateCircle(new VELatLong(52.720490172853076, -7.837371826171884), 5, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetLineColor(new VEColor(0, 0, 238,1.0));
    map.AddShape(circle);


    // Premier broadband
    var circle =   CreateCircle(new VELatLong(52.649729197309426, -7.731628417968742), 5, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetLineColor(new VEColor(0, 0, 238,1.0));
    map.AddShape(circle);


    // ADSL
    var circle =   CreateCircle(new VELatLong(52.681377687137406, -7.811279296874996), 1, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetFillColor(new VEColor(0,255,0,1.0));
    circle.SetLineColor(new VEColor(0,255,0,1.0));
    circle.SetTitle("Title for shape02");
    circle.SetDescription("This is the description of shape02.");    
    map.AddShape(circle);    


    // ADSL
    var circle =   CreateCircle(new VELatLong(52.64181349342543, -7.724075317382811), 1, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetFillColor(new VEColor(0,255,0,1.0));
    circle.SetLineColor(new VEColor(0,255,0,1.0));
    circle.SetTitle("Title for shape02");
    circle.SetDescription("This is the description of shape02.");    
    map.AddShape(circle);    

    // ADSL
    var circle =   CreateCircle(new VELatLong(52.64098017809179, -7.8497314453125), 1, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetFillColor(new VEColor(0,255,0,1.0));
    circle.SetLineColor(new VEColor(0,255,0,1.0));
    circle.SetTitle("Title for shape02");
    circle.SetDescription("This is the description of shape02.");    
    map.AddShape(circle);    

    // ADSL
    var circle =   CreateCircle(new VELatLong(52.71633093604628, -8.407287597656246), 1, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetFillColor(new VEColor(0,255,0,1.0));
    circle.SetLineColor(new VEColor(0,255,0,1.0));
    circle.SetTitle("Title for shape02");
    circle.SetDescription("This is the description of shape02.");    
    map.AddShape(circle);    

 
 // ADSL
    var circle =   CreateCircle(new VELatLong(52.816043191549326, -8.434753417968757), 1, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetFillColor(new VEColor(0,255,0,1.0));
    circle.SetLineColor(new VEColor(0,255,0,1.0));
    circle.SetTitle("Title for shape02");
    circle.SetDescription("This is the description of shape02.");    
    map.AddShape(circle); 

 // ADSL
    var circle =   CreateCircle(new VELatLong(52.86249745970947, -8.19786071777343), 1, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetFillColor(new VEColor(0,255,0,1.0));
    circle.SetLineColor(new VEColor(0,255,0,1.0));
    circle.SetTitle("Title for shape02");
    circle.SetDescription("This is the description of shape02.");    
    map.AddShape(circle); 


 // ADSL
    var circle =   CreateCircle(new VELatLong(52.951120163681836, -7.8030395507812535), 1, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetFillColor(new VEColor(0,255,0,1.0));
    circle.SetLineColor(new VEColor(0,255,0,1.0));
    circle.SetTitle("Title for shape02");
    circle.SetDescription("This is the description of shape02.");    
    map.AddShape(circle); 


 // cablenet
    var circle =   CreateCircle(new VELatLong(52.678879955403936, -7.8016662597656285), 1, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetFillColor(new VEColor(0,255,0,1.0));
    circle.SetLineColor(new VEColor(199,21,133,1.0));
    circle.SetTitle("Title for shape02");
    circle.SetDescription("This is the description of shape02.");    
    map.AddShape(circle); 


 // cablenet
    var circle =   CreateCircle(new VELatLong(52.811063001001465, -8.4429931640625), 2, GeoCodeCalc.EarthRadiusInMiles)
    circle.HideIcon(); // Hide the icon so we only see the Circle
    circle.SetFillColor(new VEColor(0,255,0,1.0));
    circle.SetLineColor(new VEColor(199,21,133,1.0));
    circle.SetTitle("Title for shape02");
    circle.SetDescription("This is the description of shape02.");    
    map.AddShape(circle); 





	// polygon

	var points = [
	new VELatLong(52.953602300028486, -7.794799804687509),


	new VELatLong(53.0915499852227, -7.910156249999986),
	new VELatLong(53.09732259357699, -8.172454833984387),
	new VELatLong(52.94119019374032, -8.043365478515637),

	new VELatLong(52.953602300028486, -7.794799804687509)


	];

	var outlineColor = new VEColor(0,0,0,1);
	var fillColor = new VEColor(0,0,0,0);
	var outlineWidth = 2;
	var id = 'Wireless Connect';
	var poly = new VEPolygon(id, points, fillColor, outlineColor, outlineWidth)
	map.AddPolygon(poly);


    
    var points = [
    
     new VELatLong(52.853687411314134, -8.183269500732416),
     
     new VELatLong(52.85627878767471, -8.191852569580085),
     
     
     new VELatLong(52.863222913400214, -8.199920654296866),
      new VELatLong(52.86146107625413, -8.21434020996095),
      new VELatLong(52.85555321788922, -8.236312866210934),
      new VELatLong(52.86187563260664, -8.239746093749993),
      new VELatLong(52.86897429550696, -8.232965469360355),
      new VELatLong(52.87503573780013, -8.227901458740227),
      new VELatLong(52.87627900588462, -8.223781585693355),
      new VELatLong(52.87741863698718, -8.215541839599614),
      new VELatLong(52.87824744079774, -8.209705352783194),
      new VELatLong(52.87710783147459, -8.203182220458998),
      new VELatLong(52.87109848707343, -8.196144104003917),
      new VELatLong(52.86457015236165, -8.197345733642578),
      new VELatLong(52.86125379659268, -8.203182220458998),
      new VELatLong(52.85544956407254, -8.206443786621095),
      new VELatLong(52.84788216681566, -8.20833206176757)
      
      
      
      
      
      
      
      
      
      
      
    ];
    
    var color = new VEColor(255,0,0,1);
    var width = 5;
    var id = 'I70';
    
    var poly = new VEPolyline(id, points, color, width);
    map.AddPolyline(poly);
map.SetMapView(points);
     
    
    
    
}

// The Map onclick event handler
function Map_Click(eventArgs)
{


    var clickedLatLong = eventArgs.latlong;
    
    
    if (map.GetMapMode() == VEMapMode.Mode2D)
    {
        // In 2D Mode the eventArgs.latlong property doesn't contain the lat/long point that was clicked.
        // So we must figure it out using the x and y coordinates of the point on the map that was clicked.
        clickedLatLong = map.PixelToLatLong(new VEPixel(eventArgs.mapX, eventArgs.mapY));
    }
    
    // When the user Right-Clicks, Draw the Polygon
    if (eventArgs.rightMouseButton)
    {
        var units = GeoCodeCalc.EarthRadiusInMiles;
        if (document.getElementById("rdKilometers").checked)
        {
            units = GeoCodeCalc.EarthRadiusInKilometers;
        }
        
        var radius = parseFloat(document.getElementById("txtRadius").value);
        if (isNaN(radius))
        {
            alert("The radius must be a number.");
        }
        else
        {
            alert("CreateCircle called");
            var circle = CreateCircle(clickedLatLong, radius, units);
            circle.HideIcon(); // Hide the icon so we only see the Circle
            map.AddShape(circle);
        }
    }



info.innerHTML = clickedLatLong;


}

function btnClearMap_Click()
{
    // Clear all points plotted
    map.DeleteAllShapes();
}
