mj_liscio
Hello again,
I have yet to take care of the clustering issue, but I have had success utilizing my ashx handler to get all of my points loaded on my map in about 10 seconds.
In case anybody is interested the code is below.
I have of course used AJAX to make this posible.
rss.ashx is my ashx handler that I am using. I can paste that code if anybody is interested. I will be happy to answer any questions about this code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></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 ajaxFunction(){
var xmlHttp;
try
{ // Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}// end try Firefox
catch (e){
// Internet Explorer
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}// end try
catch (e){
try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}// end try
catch (e){
alert("Your browser does not support AJAX!");
return false;
}// end catch browser does not support
}// end catch (e)
}// end catch Internet Explorer
window.status = "loading pushpin data please wait";
xmlHttp.open("GET","rss.ashx",true);
xmlHttp.send(null);
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
alert(xmlHttp.status);
alert("true " + xmlHttp.readyState);
var xmlDoc = xmlHttp.responseXML;
IDNodes = xmlDoc.getElementsByTagName("Identity");
LocNodes = xmlDoc.getElementsByTagName("Location");
TitleNodes = xmlDoc.getElementsByTagName("Title");
DetNodes = xmlDoc.getElementsByTagName("Details");
LatNodes = xmlDoc.getElementsByTagName("Latitude");
LogNodes = xmlDoc.getElementsByTagName("Longitude");
alert(IDNodes[2].firstChild.nodeValue);
window.status = "Done";
map.AttachEvent('onendzoom', OnEndZoom);
}// end else
}// xmlHttp.onreadystatechange function()
}// end ajax function
function returnNode(xmldoc){
var testNode;
}// end returnNode
function GetMap()
{ ajaxFunction()
map = new VEMap('myMap');
map.LoadMap(new VELatLong(39.89288, -89.14306), 4);
}// end GetMap
function OnEndZoom()
{
var currentZoom = map.GetZoomLevel();
alert("Zoom = " + currentZoom);
alert("Center = " + map.GetCenter());
if(currentZoom == 5){
alert("RSS Feed will be activated at this point");
}// end if
}// end onEndZoom
</script>
</head>
<body onload="GetMap();">
<div id='myMap' style="position:relative; width:100%; height:100%;"></div>
</body>
</html>
Mike