MapModulePlugin.MarkerVisibilityRequest RPC
Show or hide marker from map.
Use cases
- hide wanted marker from map
- hide all markers from map
- show wanted marker from map
- show all markers from map
Description
Markers can be hided/showed to the map by sending an MarkerVisibilityRequest. The request must contain the marker visibility and optional parameter is wanted marker id. If marker id is not defined then show/hide all markers from map.
Parameters
(* means the parameter is required)
Name | Type | Description | Default value |
---|---|---|---|
/* visibility | Boolean | is marker visible (true/false) | |
id | String | id for marker. |
Examples
Hide wanted marker from map:
Oskari.getSandbox().postRequestByName('MapModulePlugin.MarkerVisibilityRequest', [false, 'TEST_MARKER_ID']);
Hide all markers from map:
Oskari.getSandbox().postRequestByName('MapModulePlugin.MarkerVisibilityRequest', [false]);
Show wanted marker from map:
Oskari.getSandbox().postRequestByName('MapModulePlugin.MarkerVisibilityRequest', [true, 'TEST_MARKER_ID']);
Show all markers from map:
Oskari.getSandbox().postRequestByName('MapModulePlugin.MarkerVisibilityRequest', [true]);
Related api
- addMarkerRequest