Class TileLayer

  • Direct Known Subclasses:
    AsyncTileLayer

    public class TileLayer
    extends DirectLayer
    TileLayer is a direct map layer that does the mosaicking work for tiles of a given tile service.
    Since:
    12
    Author:
    Ugo Taddei
    • Constructor Detail

    • Method Detail

      • getBounds

        public ReferencedEnvelope getBounds()
        Description copied from class: Layer
        The bounds of the Layer content (if known). The bounds can be used to determine if any of the layers content is "on screen" when rendering the map; however often it is expensive to calculate a layers bounds up front so we are allowing this value to be optional.

        The returned bounds are a ReferencedEnvelope using the same CoordinateReferenceSystem as the layers contents.

        Specified by:
        getBounds in class Layer
        Returns:
        layer bounds, null if unknown
      • draw

        public void draw​(Graphics2D graphics,
                         MapContent map,
                         MapViewport theViewport)
        Description copied from class: DirectLayer
        Draw layer contents onto screen
        Specified by:
        draw in class DirectLayer
        Parameters:
        graphics - Graphics to draw into
        map - Map being drawn; check map bounds and crs
        theViewport - Area to draw the map into; including screen area
      • renderTile

        protected void renderTile​(Tile tile,
                                  Graphics2D g2d,
                                  double[] points)