Class MapImage


  • public class MapImage
    extends Object
    An image that will be displayed on the map.
    • Field Detail

      • img

        private Image img
        ImageIcon can change while the image is loading.
      • alpha

        public int alpha
        The alpha (opacity) value of the image. It is multiplied to the image alpha channel. Range: 0...255
      • autoRescale

        public boolean autoRescale
        A flag indicating that the image should automatically be scaled to the right size.
      • width

        public int width
        The width of the image, as set by MapCSS
      • height

        public int height
        The height of the image, as set by MapCSS
      • offsetX

        public int offsetX
        The x offset of the anchor of this image
      • offsetY

        public int offsetY
        The y offset of the anchor of this image
    • Constructor Detail

      • MapImage

        public MapImage​(String name,
                        StyleSource source)
        Creates a new MapImage
        Parameters:
        name - The image name
        source - The style source that requests this image
      • MapImage

        public MapImage​(String name,
                        StyleSource source,
                        boolean autoRescale)
        Creates a new MapImage
        Parameters:
        name - The image name
        source - The style source that requests this image
        autoRescale - A flag indicating to automatically adjust the width/height of the image