Oskari API Documentation

Select event

admindown-arrow
cataloguedown-arrow
frameworkdown-arrow
mappingdown-arrow
statisticsdown-arrow
uidown-arrow

AfterAddMarkerEvent RPC

Notifies that marker has been added to the map.

Description

Event is sent after marker has been added to the map. It is used to notify marker id to user.

Parameters

(* means the parameter is required)

Name Type Description Default value
\* data Object marker parameters
\* id String id of the marker that was added to the map

RPC

Event occurs when marker is added to the map.


{
  "id": "RPC_MARKER"
}

Event methods

getName()

Returns name of the event.

getData()

Returns marker data, for example:


{
    x: 411650.70779123,
    y: 6751897.3481153,
    color: "ff0000",
    msg : '',
    shape: 3,
    size: 3
};

getID()

Returns id of the marker.

getParams()

Returns id of the marker as an object as follows:


{
  "id": "RPC_MARKER"
}

Examples

MarkersPlugin sends AfterAddMarkerEvent when marker is added.


var addEvent = me.getSandbox().getEventBuilder(
    'AfterAddMarkerEvent')(data, data.id);
me.getSandbox().notifyAll(addEvent);