Пример #1
0
 /// <summary>
 /// Extracts style information.
 /// </summary>
 /// <param name="icon"></param>
 /// <returns></returns>
 public static Icon2DStyle From(Icon2D icon, int layer)
 {
     Icon2DStyle newStyle = new Icon2DStyle();
     newStyle.Image = icon.Image;
     newStyle.MaxZoom = icon.MaxZoom;
     newStyle.MinZoom = icon.MinZoom;
     newStyle.Layer = layer;
     return newStyle;
 }
Пример #2
0
 /// <summary>
 /// Adds a new style and returns it's index.
 /// </summary>
 /// <param name="icon"></param>
 /// <param name="layer"></param>
 /// <returns></returns>
 public ushort AddStyle(Icon2D icon, int layer)
 {
     Icon2DStyle newStyle = Icon2DStyle.From(icon, layer);
     int indexOf = this.IconStyles.IndexOf(newStyle);
     if (indexOf < 0)
     { // the style is not found yet.
         indexOf = this.IconStyles.Count;
         this.IconStyles.Add(newStyle);
     }
     return (ushort)indexOf;
 }
Пример #3
0
 /// <summary>
 /// Sets the style information.
 /// </summary>
 /// <param name="icon"></param>
 public void Set(Icon2D icon)
 {
     icon.Image = this.Image;
     icon.MaxZoom = this.MaxZoom;
     icon.MinZoom = this.MinZoom;
 }