Class SpriteIndex.IconInfo

  • Enclosing class:
    SpriteIndex

    public static class SpriteIndex.IconInfo
    extends Object
    Wrapper for parsing the properties of an individual sprite index entry (JSONObject) for a single icon. For example:
     
     {
      "width": 32,
      "height": 32,
      "x": 0,
      "y": 0,
      "pixelRatio": 1
     }
     
     
    See Also:
    https://www.mapbox.com/mapbox-gl-js/style-spec/#sprite
    • Constructor Summary

      Constructors 
      Constructor Description
      IconInfo​(String iconName, JSONObject json)  
    • Constructor Detail

      • IconInfo

        public IconInfo​(String iconName,
                        JSONObject json)
        Parameters:
        iconName - The name of this sprite icon (used for error messages)
        json - The sprite index entry for this icon, as a JSONObject
    • Method Detail

      • getWidth

        public int getWidth()
      • getHeight

        public int getHeight()
      • getX

        public int getX()
      • getY

        public int getY()
      • getPixelRatio

        public int getPixelRatio()