views:

95

answers:

1

Hi All,

I am using sqlserver2008 to display information on top of virtual earth.I have written one genericHandler to retrieve data from Sqlserver2008.I am calling handler through javascript.The problem here is when i run handler through broser it is giving me coorect feed.But when i try to load call from javascript i am getting the error "unable to load source file."

my javascript code is as follows

function LoadGeoRSSSQL(Lat, Lon) {

  var shapeLayer=new VEShapeLayer();
  map.DeleteAllShapes();

  var url = "../GetFeature.ashx?";
  url += "Lat=" + Lat;
  url += "&Lon=" + Lon;
  alert(url);

  var veLayerSpec = new VEShapeSourceSpecification(VEDataType.GeoRSS, url, shapeLayer);
  alert(veLayerSpec.LayerSource);
  map.ImportShapeLayerData(veLayerSpec, onGeoRSSParcelLoad, false);
}

can anyone help this to solve?

Thanks in advance

A: 

Hi

I guess you might have figured out the issue by now. I too faced the same issue and in my case the issue was with the geoRss output from aspx file. The georss was not a valid XML and I found out this by outputting the aspx to browser directly. In the above example, the URL in the alert msg needs to be typed in address bar and it should show a valid geoRss.

After that was taken care of, this was no more an issue.

Also, you may want to see the type of geoRss that Bing map expects in this link

Thanks

Honey krishnan

HoneyKrishnan