From 39539214df3ae7993bc13af738898ae95fafe2fe Mon Sep 17 00:00:00 2001 From: GRL Date: Mon, 17 May 2021 10:13:48 +0200 Subject: [PATCH] documentation of SetProperty --- docs/maps/api-reference.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/maps/api-reference.md b/docs/maps/api-reference.md index d7d7f385..6e98dfb5 100644 --- a/docs/maps/api-reference.md +++ b/docs/maps/api-reference.md @@ -252,4 +252,15 @@ WA.showLayer('bottom'); WA.hideLayer('bottom'); ``` +### Set/Create properties in a layer + +``` +WA.setProperty(layerName : string, propertyName : string, propertyValue : string | number | boolean | undefined) : void; +``` + +Set the value of the "propertyName" property of the layer "layerName" at "propertyValue". If the property doesn't exist, create the property "propertyName" and set the value of the property at "propertyValue". + +```javascript +WA.setProperty('wikiLayer', 'openWebsite', 'https://www.wikipedia.org/'); +```