sumit72


First, thanks for the advice on uploading a live search collection into my website. The "10 minute map" took me longer than 10 minutes, but I finally got it and made all the changes I wanted, with 1 exception. I still can't get a small dashboard for v4. I have a rather small map on my site, the large one obstructs the view, and I don't need the 3d/Bird's eye functions.

(Can I ask that someone show's me the "small dashboard" script along with the rest of the script. I'm a little slow when it comes to this sort of thing, so it would help alot).

Thank you.




Re: small dashboard control for VirtualEarth v4?

SoulSolutions


Version4 doesn't have the 3 dashboard options, you can however hide the dashboard and make your own custom one, this is for V3 but it is very similar:

http://www.viavirtualearth.com/vve/Articles/GettingStartedWithV3Pt1.ashx

John.







Re: small dashboard control for VirtualEarth v4?

Derrick

Since v5 is out, my advise is to use v5. Here's the code from the "10 minute map", but using the v5 map instead.

Code Snippet

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>The 10 Minute Map</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx v=5" ></script>

<script>
var map = null;

function OnPageLoad()
{
map = new VEMap('mymapdiv');

//Change the dashboard size to small

map.SetDashboardSize(VEDashboardSize.Small);
map.onLoadMap = fnLoadCollection;
map.LoadMap();
}

function fnLoadCollection()
{
document.getElementById('searchresults').innerHTML = "<center><b>Loading Collection...</b></center>";

//Change the "EE8A32C733F8E28D!601" to your own collection ID.
var veLayerSpec = new VEShapeSourceSpecification(VEDataType.VECollection, "EE8A32C733F8E28D!601"); //Dublin Tour
map.ImportShapeLayerData(veLayerSpec, fnLayerLoaded, true);
}


function fnLayerLoaded(layer)
{
var len = layer.GetShapeCount();
document.getElementById('searchresults').innerHTML = "<center>Loaded " + len + " Locations";
var outline = "";
var cnt=0;
for (cnt=0;cnt < len; cnt++) {
var shape = layer.GetShapeByIndex(cnt);
var lnk = "<a href='#' onclick='javascript:map.SetCenterAndZoom(new VELatLong(" +
shape.GetPoints()[0].Latitude + "," +
shape.GetPoints()[0].Longitude + "),16);'>";
outline = outline + "<b>" + lnk + (cnt+1) + ". " +
shape.GetTitle() + "</a></b><br>" +
shape.GetDescription() + "<br><br>";
}

outline = outline + "";

document.getElementById('searchresults').innerHTML = outline;
}

</script>

</head>

<body onLoad="OnPageLoad()">
<div>The 10 Minute Map<br></div>

<table>
<tr valign=top>
<td>
<div id="mymapdiv" STYLE="HEIGHT: 600px; WIDTH: 800px; OVERFLOW: hidden; POSITION:relative; border: 1px solid;">
</div>
</td>
<td>
<div id="searchresults"></div>
</td>
</tr>
</table>

</body>
</html>