Class GeoJsonLayer.Plugin

All Implemented Interfaces:
MapLayerFactoryPlugin<GeoJsonLayer.GeoJsonParam>
Enclosing class:
GeoJsonLayer

public static final class GeoJsonLayer.Plugin extends AbstractFeatureSourceLayerPlugin<GeoJsonLayer.GeoJsonParam>
Renders GeoJSON layers.

Type: geojson [[examples=json_styling,datasource_multiple_maps,printwms_tyger_ny_EPSG_3857]]

  • Constructor Details

    • Plugin

      public Plugin()
      Constructor.
  • Method Details

    • createParameter

      public GeoJsonLayer.GeoJsonParam createParameter()
      Description copied from interface: MapLayerFactoryPlugin
      Create an instance of a param object. Each instance must be new and unique. Instances must NOT be shared.

      The object will be populated from the json. Each public field will be populated by looking up the value in the json.

      The same mechanism used for reading from the JSON into the param object is also used for parsing the JSON into Attribute value objects. See ReflectiveAttribute.createValue(org.mapfish.print.config.Template)()} for details on how the parsing mechanism works.

    • parse

      @Nonnull public GeoJsonLayer parse(@Nonnull Template template, @Nonnull GeoJsonLayer.GeoJsonParam param)
      Description copied from interface: MapLayerFactoryPlugin
      Inspect the json data and return Optional<MapLayer> or Optional.absent().
      Parameters:
      template - the configuration related to the current request.
      param - an object populated from the json for the layer