Class GeoJsonMBSource

    • Constructor Detail

      • GeoJsonMBSource

        public GeoJsonMBSource​(JSONObject json)
      • GeoJsonMBSource

        public GeoJsonMBSource​(JSONObject json,
                               MBObjectParser parser)
    • Method Detail

      • getData

        public Object getData()
        (Optional) A URL to a GeoJSON file, or inline GeoJSON.
        Returns:
        GeoJSON to draw, either inline or a URL.
      • getMaxZoom

        public Number getMaxZoom()
        (Optional) Defaults to 18. Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).
        Returns:
        Number for the max zoom, defaulting to 18.
      • getBuffer

        public Number getBuffer()
        (Optional) Defaults to 128. Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance.
        Returns:
        Number for the size of the tile buffer
      • getTolerance

        public Number getTolerance()
        (Optional) Defaults to 0.375. Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance).
        Returns:
        Number for the simplification tolerance, defaulting to 0.375
      • getCluster

        public Boolean getCluster()
        (Optional) Defaults to false. If the data is a collection of point features, setting this to true clusters the points by radius into groups.
        Returns:
        Boolean, whether to cluster, defaulting to false
      • getClusterRadius

        public Number getClusterRadius()
        (Optional) Defaults to 50.

        Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile.

        Returns:
        Number for the cluster radius, defaulting to 50
      • getClusterMaxZoom

        public Number getClusterMaxZoom()
        (Optional) Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered).
        Returns:
        Number for the cluster max zoom
      • getType

        public String getType()
        Description copied from class: MBSource
        Type of source.
        Specified by:
        getType in class MBSource
        Returns:
        One of "vector", "raster", "geojson", "image", "video", "canvas".