private static Style generateDefaultSyle(Feature f)
{
if (f.Geometry is GeoPoint)
{
Style pmstyle = null;
if (f.Layer.Map.Theme == null)
{
pmstyle = new PredefinedMarkerStyle() { Color = new SolidColorBrush(Colors.Red), Size = 10 };
}
else
{
pmstyle = new PredefinedMarkerStyle() { Color = f.Layer.Map.Theme.Color, Size = f.Layer.Map.Theme.Size };
}
return pmstyle;
}
else if (f.Geometry is GeoLine)
{
Style plstyle = null;
if (f.Layer.Map.Theme == null)
{
plstyle = new PredefinedLineStyle() { Stroke = new SolidColorBrush(Color.FromArgb(99, 255, 0, 0)), StrokeThickness = 2 };
}
else
{
plstyle = new PredefinedLineStyle() { Stroke = f.Layer.Map.Theme.Stroke, StrokeThickness = f.Layer.Map.Theme.StrokeThickness };
}
return plstyle;
}
else
{
Style pfstyle = null;
if (f.Layer.Map.Theme == null)
{
pfstyle = new FillStyle() { Fill = new SolidColorBrush(Color.FromArgb(99, 255, 0, 0)) };
}
else
{
pfstyle = new FillStyle() { Fill = f.Layer.Map.Theme.Fill, Stroke = f.Layer.Map.Theme.Stroke };
}
return pfstyle;
}
}