I am adding the icon field in a GeoRSS XML feed and would like the icon change per GPS position. I would like to take the following code:
public string NumToEnforcementLevel(int Level)
{
switch (Level)
{
case 1:
return "Low";
case 2:
return "Moderate";
case 3:
return "High";
}
return "Unspecified";
}
and make the level part of the url for each gps point.
public XmlTextWriter AddRSSItem(XmlTextWriter writer, string Title,int level, string Description, double Lat, double Lon)
{
writer.WriteStartElement("item");
writer.WriteElementString("title", Title);
writer.WriteElementString("description", Description);
writer.WriteElementString("geo:lat", Lat.ToString());
writer.WriteElementString("geo:long", Lon.ToString());
**** writer.WriteElementString("icon", "http://njection.com/speedtrap/Images/" + level + ".png");*****
writer.WriteEndElement();
return writer;
}
What would be the best way of doing this?