Class TLcdWMSGXYViewFactory

java.lang.Object
com.luciad.wms.server.TLcdWMSGXYViewFactory

public class TLcdWMSGXYViewFactory extends Object
Factory class defining the methods to create and configure a new TLcdGXYViewBufferedImage to generate a map inside the WMS Server.

Extensions can be made to customize the view creation and initialization process:

  • the protected method createGXYViewInstance creates TLcdGXYViewBufferedImage instances, capable of handling transparency if required (boolean parameter). Override this method to return extensions of TLcdGXYViewBufferedImage (e.g., to add a fixed logo in the corner of the map).
  • the public method createGXYView
  • creates and customizes a TLcdGXYViewBufferedImage according to the supplied parameters. Override this method to change the configuration of TLcdGXYViewBufferedImage instances (e.g., to set a custom ILcdGXYViewLabelPainter).
  • Constructor Details

    • TLcdWMSGXYViewFactory

      public TLcdWMSGXYViewFactory()
      Constructs a new TLcdWMSGXYViewFactory.
  • Method Details

    • createGXYViewInstance

      protected TLcdGXYViewBufferedImage createGXYViewInstance(boolean aTransparent)
      Creates a new TLcdGXYViewBufferedImage with the given transparency setting.

      For TLcdGXYViewBufferedImage objects, the transparency setting needs to be determined at creation time.

      Parameters:
      aTransparent - Whether the image should be capable of using transparent colors.
      Returns:
      a new TLcdGXYViewBufferedImage with the given transparency setting.
    • createGXYView

      public TLcdGXYViewBufferedImage createGXYView(boolean aTransparent, int aWidth, int aHeight, ILcdBounds aWorldBounds, ILcdXYWorldReference aXYWorldReference, Color aBackgroundColor, TLcdWMSRequestContext aRequestContext)
      Creates a new TLcdGXYViewBufferedImage with the given settings.

      The default implementation creates a new view through createGXYViewInstance(boolean) and adjusts the following settings of the view:

      • the width and height are respectively set to aWidth and aHeight,
      • the background color is set to aBackgroundColor,
      • the world reference is set to aXYWorldReference,
      • the visible world area is set according to aWorldBounds,
      • a view label placer is set.
      Parameters:
      aTransparent - whether the image should be capable of using transparent colors.
      aWidth - the width to be used for the view.
      aHeight - the height to be used for the view.
      aWorldBounds - the bounds to fit on, expressed in the supplied world reference.
      aXYWorldReference - the world reference to be used for the view.
      aBackgroundColor - the background color to be used for the view.
      aRequestContext - a container for the original request and other related request parameters.
      Returns:
      a new TLcdGXYViewBufferedImage initialized with the given settings.
    • createGXYView

      public TLcdGXYViewBufferedImage createGXYView(boolean aTransparent, int aWidth, int aHeight, ILcdBounds aWorldBounds, ILcdXYWorldReference aXYWorldReference, double aRotation, Color aBackgroundColor, TLcdWMSRequestContext aRequestContext)
      Creates a new TLcdGXYViewBufferedImage with the given settings.

      The default implementation creates a new view through createGXYViewInstance(boolean) and adjusts the following settings of the view:

      • the width and height are respectively set to aWidth and aHeight,
      • the background color is set to aBackgroundColor,
      • the world reference is set to aXYWorldReference,
      • the visible world area is set according to aWorldBounds,
      • the view rotation is set according to aRotation,
      • a view label placer is set.
      Parameters:
      aTransparent - whether the image should be capable of using transparent colors.
      aWidth - the width to be used for the view.
      aHeight - the height to be used for the view.
      aWorldBounds - the bounds to fit on, expressed in the supplied world reference.
      aXYWorldReference - the world reference to be used for the view.
      aRotation - the rotation to be used for the view, expressed in degrees.
      aBackgroundColor - the background color to be used for the view.
      aRequestContext - a container for the original request and other related request parameters.
      Returns:
      a new TLcdGXYViewBufferedImage initialized with the given settings.
      Since:
      2022.0