DannyMac


So I decided to upgrade the VE Map Control from v4 to v5. I was surprised at the lack of backwards compatability from v4. That aside, I am using the GeoRSS map points (retrieved via a call to a HttpHandler). When I construct my rss/xml document. I follow MS's VE SDK example. The following is a sample of xml that is used in that example:

Code Snippet



<item>
<title>Coldwater Lake</title>
<description>Formed by the 1980 eruption of Mount St. Helens.</description>
<georss:polygon>
46.31409 -122.22616 46.31113 -122.22968 46.31083 -122.23320 46.29802 -122.25877 46.29245 -122.26641 46.29286 -122.26392 46.28746 -122.26744 46.28741 -122.26006 46.29049 -122.25955 46.29120 -122.25620 46.28924 -122.255430 46.30271 -122.23251 46.31284 -122.22315 46.31409 -122.22616
</georss:polygon>
<mappoint:icon>
http://dev.live.com/virtualearth/sdk/img/hiking_icon.gif
</mappoint:icon>
</item>

Regarding the mappoint node, it doesn't work. I included the appropriate rss headers:

Code Snippet

<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xmlns:mappoint="http://virtualearth.msn.com/apis/annotate#">

Next I tried replacing the <mappoint:icon> with just <icon> and that didn't work. The only way I could modify the image displayed is in the callback of the load of the feed. I can do that if necessary, but I'd prefer to set the image in the GeoRSS. Anyone got any ideas




Re: Virtual Earth v5 GeoRSS spec - Icon node not working

Weavil


Looking through the example Microsoft code and js file, the icon doesn't appear to being pulled in from the xml, but the actual image URL is in the function call.

Code Snippet

AddMyLayer(VEDataType.GeoRSS,'GeoRSSTest.xml','./img/hiking_icon.gif');







Re: Virtual Earth v5 GeoRSS spec - Icon node not working

tonito

I need to use individual icon in polygon xml file , so , what do i do there is a bug in VE5 anybody is working around that





Re: Virtual Earth v5 GeoRSS spec - Icon node not working

Derek Chan

Don't think its a VE5 bug, just a confusing tag that was added to that particular GeoRSS File. The point of the V5 release was to support GeoRSS <polygon> and <polyline> tags, but no other additional features apart from that.

Another giveaway is that the tag is <mappoint:icon> which doesn't correspond to GeoRSS standards and also the name "mappoint" would be likely incorrect.






Re: Virtual Earth v5 GeoRSS spec - Icon node not working

DannyMac

yeah, figured that might be the case, but wanted confirmation. thanks.




Re: Virtual Earth v5 GeoRSS spec - Icon node not working

ttchipster

Can you provide a reference to the example jscript, i.e. with the version of AddMyLayer that takes 3 arguments

The example code I found at http://dev.live.com/virtualearth/sdk/ has the problem you describe (of not loading the icon), but AddMyLayer(type) only has the one parameter:

Code Snippet

function AddMyLayer(type)
{
test.value = txtSource.value;
var l = new VEShapeLayer();
var veLayerSpec = new VEShapeSourceSpecification(type, txtSource.value, l);
map.ImportShapeLayerData(veLayerSpec, onFeedLoad);
}

Thanks.





Re: Virtual Earth v5 GeoRSS spec - Icon node not working

Derek Chan

Hi,

There actually is a way to get the <icon> node working, and I've posted a general strategy on how to do it in V5 (the functionality is there, just that its supported yet):

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1664041&SiteID=1

Hope that helps,