Created
December 24, 2010 14:43
-
-
Save follesoe/754302 to your computer and use it in GitHub Desktop.
Integrating Virtual Earth with Outlook 2007
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<title>Virtual Earth</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<style type="text/css"> | |
body | |
{ | |
margin: 0px; | |
padding: 0px; | |
} | |
</style> | |
<script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5" type="text/javascript"></script> | |
<script type="text/javascript"> | |
var map = null; | |
var pinid = 0; | |
var title = ""; | |
var description = ""; | |
function GetMap() | |
{ | |
map = new VEMap('myMap'); | |
map.SetDashboardSize(VEDashboardSize.Small); | |
map.LoadMap(); | |
} | |
function FindLocation(location, contactName, contactDescription) | |
{ | |
try | |
{ | |
title = contactName; | |
description = contactDescription; | |
if(map == null) | |
GetMap(); | |
map.Find(null, location, null, null, 1, 1, true, true, true, true, LocationFound); | |
} | |
catch(e) | |
{ | |
alert(e.message); | |
} | |
} | |
function LocationFound(a, b, placeArray, d, e) | |
{ | |
var shape = new VEShape(VEShapeType.Pushpin, placeArray[0].LatLong); | |
shape.SetTitle(title); | |
shape.SetDescription(description); | |
pinid++; | |
map.AddShape(shape); | |
} | |
</script> | |
</head> | |
<body> | |
<div id='myMap' style="position: relative; width: 100%; height: 100%;"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment