Class: IWGeoJSONStyleFromProperties

IWGeoJSONStyleFromProperties

A GeoJSON style which uses the properties of the GeoJSON features to style them. For example, add the stroke property to a feature to set the color of this feature, or stroke-width to set the width of a polyline. If only some or none of the properties are set, default values are used. Properties for polylines:
  • stroke: Stroke color of the line
  • stroke-opacity: Opacity of the line
  • stroke-width: Width of the line
  • stroke-dash-style: Dash style of the line (solid, dashed or dotted)
  • stroke-dasharray: Individual pattern of dashes and gaps; will overwrite stroke-dash-style
  • stroke-linecap: shape of the end of line parts
Properties for polygons:
  • fill: Fill color of the polygon
  • fill-opacity: Opacity of the polygon
  • stroke: Stroke color of the outer line of the polygon
  • stroke-opacity: Opacity of the outer line of the polygon
  • stroke-width: Width of the outer line of the polygon
  • stroke-dash-style: Dash style of the outer line of the polygon (solid, dashed or dotted)
  • stroke-dasharray: Individual pattern of dashes and gaps; will overwrite stroke-dash-style
  • stroke-linecap: shape of the end of line parts
Properties for point features:
  • icon-data: A data URL with an icon for this point
  • icon-width: Width of the icon in px (only used when icon-data is present)
  • icon-height: Height of the icon in px (only used when icon-data is present)
  • fill: Fill color of the marker (used when the points in the cluster do not have an icon-data property, or the cluster contains points with different icons)

new IWGeoJSONStyleFromProperties(defaultValuesPolyline, defaultValuesPolygon, options)

Creates a new style. Default values for the rendering of polylines and polygons can be provided. Available options are:
  • clustering: Show point features as clusters instead of individual markers (default true)
Parameters:
Name Type Description
defaultValuesPolyline object an object with rendering attributes for polylines
defaultValuesPolygon object an object with rendering attributes for polygons
options object an object with additional options

Extends

Methods


getPointLayer()

Returns rendering attributes for the POI layer based on the properties of the first feature in a cluster.
Overrides:

getPolygonStyle()

Returns rendering attributes for the provided polygon based on the properties of the feature.
Overrides:

getPolylineStyle()

Returns rendering attributes for the provided polyline based on the properties of the feature.
Overrides: