Hi,
I´m currently working on a custom webpage for data delivery.
I´ve used some code from the following example in FME Playground: https://playground.fmeserver.com/javascript/data-delivery/open-layers-integration/
I´m wondering how it´s possible to change the token in the FMEServer.init below, to a token that is generated thru the example here: https://playground.fmeserver.com/javascript/authorization/request-a-token/
Pre-generated setup for the token:
FMEServer.init({
server : "https://demos-safe-software.fmecloud.com",
token : "568c604bc1f235bbe137c514e7c61a8436043070"
});
I want to use the "guestToken" thats been generated in the Javascript below instead:
function processToken(token) {
if( typeof token == 'string' ){
guestToken = token.trim();
} else {
guestToken = "<pre>"+JSON.stringify(token, undefined, 4)+"</pre>";
}
Both codes works sepetratly in the same project, but rather then parse the token into a new div in the html-file, i would like to use it as the token.
I´m not that used at Javascrpt to get this to work, but maybe someone else?
Or is there any other, more simple way to accomplish this task?
I´ve tried to work thru the documentation but nothing leads me to a conclusion.
Thanks in advance