pin

Available for:Map PanelBI Map Panel

Methods

Name Summary
add

Adds pins to the map.

clear

Removes all pins

setVisibility

Sets visibility of the pin layer

Methods • Details

add(config, callback) → {void}

Available for:Map PanelBI Map Panel

Adds pins to the map. Handles GeoJSON data including FeatureCollections, Features and all geometry types supported by Leaflet. When geometry is not a point, then point is taken from the crossing of diagonals of the bounding geometry.

Parameters

Name Type Description
config Object
{
 "geojson": String,
 "actions": Object,
 "actions.over": function,
 "actions.out": function,
 "actions.clicked": function,
 "icon": Object,
 "icon.url": String,
 "icon.shadowUrl": String,
 "icon.size": Array,
 "icon.shadowSize": Array,
 "icon.anchor": Array,
 "icon.shadowAnchor": Array,
 "icon.className": String,
 "icon.html": String,
 "x": Number,
 "y": Number,
 "featureClassId": String
}

Configuration parameters. Either geojson or x and y or points must be provided.

geojson optional

GeoJSON data.

actions optional

Events on the pin.

actions.over optional

What happens on the "pin mouse over".

actions.out optional

What happens on the "pin mouse out".

actions.clicked optional

What happens on the "pin mouse clicked".

icon optional

Pin icon object.

icon.url

URL of the icon image.

icon.shadowUrl optional

URL of the shadow icon image. No shadow displayed if null.

icon.size

[width, height] of the marker icon.

icon.shadowSize optional

[width, height] of the shadow icon.

icon.anchor

[x, y] of the marker icon's anchor point.

icon.shadowAnchor optional

[x, y] of the shadow icon's anchor point.

icon.className optional

A custom class name to assign to both icon and shadow images.

icon.html optional

Use a simple div element instead of an image.

x optional

X (easting) coordinate on current CRS.

y optional

Y (northing) coordinate on current CRS.

featureClassId optional

Feature Class ID.

callback optional

Callback exectuted on success.

Returns

TypeDescription
void

clear(config, callback) → {void}

Available for:Map PanelBI Map Panel

Removes all pins

Parameters

Name Type Description
config Object
{
 "featureClassId": String
}
optional

Configuration parameters

featureClassId optional

Feature Class ID

callback optional

Callback exectuted on success

Returns

TypeDescription
void

setVisibility(config, callback) → {void}

Available for:Map PanelBI Map Panel

Sets visibility of the pin layer

Parameters

Name Type Description
config Object|Boolean
{
 "visibility": Boolean
}

Configuration parameters or boolean visibility value

visibility

Visibility

callback optional

Callback exectuted on success

Returns

TypeDescription
void