public static ColorInfo ToColorInfo(this Feature feature)
{
uint fillColor = ToARGB((string)feature.Properties.Get("fillColor"), (string)feature.Properties.Get("fillOpacity"));
uint strokeColor = ToARGB((string)feature.Properties.Get("strokeColor"), (string)feature.Properties.Get("strokeOpacity"));
int strokeWidth;
if (!int.TryParse((string)feature.Properties["strokeWidth"], out strokeWidth))
{
strokeWidth = 1;
}
return new ColorInfo
{
FillColor = fillColor,
StrokeColor = strokeColor,
StrokeWidth = strokeWidth
};
}