sww

SWW API usage

Before using the API, the environment must be set to configure where the API request will be sent as well as the JWT token to use for authentication.

To set the environment, use the environment.setEnvironment function.

sww.setEnvironment();

Without any parameter, the environment will default to prod. To force the environment to s specific value, use the environment parameter.

sww.setEnvironment("int");

Before using the API, the JWT token for the current user must be set, use the environment.setJwtToken function.

sww.setJwtToken("xxx");

HikingEditor.HikingEditor is a class that allows to edit a hiking.

ElevationProfile.ElevationProfile is a class that allows to display an elevation profile.

mvt.MVTLayer is a class that allows to create an OpenLayers layer to display hikings, poi or detours.

To get the list of user hiking, use the function getUserHiking:

sww.getUserHiking().then((hikingList) => {
console.log(hikingList);
});