Welcome to MSDN Blogs Sign in | Join | Help

Fun with GeoRSS, Virtual Earth and WCF Syndication

WCF Syndication APIs are great. In just a couple of hours I wrote a simple GeoRSS feed, a fairly high level library to encapsulate the details of common entities (lines, points, polygons), all unit tests and a mashup with VE to test it.

I only encountered a couple of incompatibilities and problems (mainly related to XML namespaces) but everything was straight forward and easy. VE doesn't allow the RSS feed to come from a different server the map is hosted, so you need a proxy to walk around this limitation (Very well explained in this blog entry. A must read for anyone doing VE stuff. Thanks for the code!). 

Being fairly new to this is space, I was amazed at the power off all these infrastructure components, and the apps that could be built with this stuff; and I know I have just barely scratched the surface.

My library allows me to easily author a GeoRss feed:

image

GeoRssData is a simple object model for geo information. GeoRSSFeedBuilder translates the domain model into a RSS feed with the proper extensions. This is all quite easy with WCF Syndication classes. Finally this the result on IE:

image

Published Monday, December 24, 2007 8:06 PM by eugeniop

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Geek Lectures - Things geeks should know about » Blog Archive » Fun with GeoRSS, Virtual Earth and WCF Syndication

# re: Fun with GeoRSS, Virtual Earth and WCF Syndication

Did you run into this problem?

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

Wondering if this was fixed the the Virtual Earth API, or if you found a way around the requirement for the geo namespace prefix?

Tuesday, December 25, 2007 8:27 PM by kaevans

# re: Fun with GeoRSS, Virtual Earth and WCF Syndication

Yes, I ran into that problem. VE likes the extension elements fully qualified and I also wanted to leverage WCF Syndication. Here's what I did (the line element as an exanple) which was teh fastest and easiest way I found, there might be others though:

private static SyndicationElementExtension GetLineExtension(Point[] line)

       {

           StringBuilder extensionXml = new StringBuilder("<georss:line xmlns:georss=\"http://www.georss.org/georss\">");

           foreach (Point x in line)

           {

               extensionXml.Append(x.Latitude.ToString() + " " + x.Longitude.ToString() + " ");

           }

           extensionXml.Append("</georss:line>");

           XmlTextReader tr = new XmlTextReader(extensionXml.ToString(), XmlNodeType.Element, null);

           SyndicationElementExtension sext = new SyndicationElementExtension(tr);

           tr.Close();

           return sext;

       }

Saturday, December 29, 2007 3:27 PM by eugeniop

# LitwareHR and GeoRSS

Some time ago , I did some experiments with Virtual Earth control and its features. I especially liked

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker