barnettr


I have used the MSDN and SDK methods for using GeoRSS layers. It renders perfectly in Firefox but for some reason - I have not yet found - it will not render in IE6. Is there some hack or workaround that needs to occur in order for a layer to appear in IE

I am going to post my test code because it is relatively short:

<html>

<head>

<title></title>

<meta http-equiv="Content-Type" content="application/rss+xml; charset=utf-8">

<script src="http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"></script>

<script>

var map = null;

var layerid = 1;

function GetMap()

{

map = new VEMap('myMap');

map.LoadMap();

}

function AddMyLayer(source)

{

var veLayerSpec = new VELayerSpecification();

veLayerSpec.Type = VELayerType.GeoRSS;

veLayerSpec.ID = layerid;

veLayerSpec.LayerSource = source;

veLayerSpec.Method = 'get';

veLayerSpec.FnCallback = onFeedLoad;

map.AddLayer(veLayerSpec);

layerid++;

}

function onFeedLoad(feed)

{

alert('RSS or Collection loaded. There are '+ feed.length +' items in this list.');

}

</script>

</head>

<body onload="GetMap(); AddMyLayer('georsstest.xml');">

<div id='myMap' style="position:relative; width:500px; height:400px;"></div>

Loading <a href="georsstest.xml">georsstest.xml</a>

</body>

</html>

thanks for any help . . .




Re: GeoRSS file not rendering in IE

Alexandru Matei


Hello,

On my Windows XP SP2 and Internet Explorer 6.0 SP 1, your code is fine.

I can see the 'RSS or Collection loaded. There are 135 items in this list.' message box.

I've tested this file: http://dev.live.com/virtualearth/sdk/georsstest.xml

Try to clear the Temporary Internet Files folder, maybe that will help






Re: GeoRSS file not rendering in IE

barnettr

Unfortunately, one of the first things I did was clear the cache. Also, running Windows XP SP2




Re: GeoRSS file not rendering in IE

barnettr

Is all of this because the VELayerSpecification Class is not supported in v5



Re: GeoRSS file not rendering in IE

Derek Chan

The reason you are experiencing this issue is because the XMLHttpRequest calls must be made to a web server in IE. In firefox it allows you to reference a file locally on your hard drive rather than over a server. I've tested in IE6 and able to load the file if it points to http://dev.live.com/virtualearth/sdk/georsstest.xml.

Hope that helps,




Re: GeoRSS file not rendering in IE

barnettr

That works Derek. What about the issue of <script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx v=5"></script> and using the VELayerSpecification Class. It appears that it is not supported in v5. Is that true



Re: GeoRSS file not rendering in IE

Derek Chan

That's correct, it's been replaced with the VESourceSpecification class.

More information about it here:
http://msdn2.microsoft.com/en-us/library/bb429606(d=ide).aspx