Oskari API documentation

Select request

admindown-arrow
frameworkdown-arrow
mappingdown-arrow
uidown-arrow

Guidedtour.AddToGuidedTourRequest

Add guide to guided tour.

Use cases

  • add bundle to guided tour

Description

Adds the requesting bundle to the guided tour. The request parameter is a delegate object that has configuration and methods for generating the content of the dialog.

Parameters

(* means the parameter is required)

Name Type Description Default value
* delegate Objectguided tour delegate

Parameters for delegate-object:

Name Type Description Default value
bundleNameStringBundle name to register guided tour
priorityIntegerGuided tour priority, 0 is highest
showFunctionFunction to show wanted functionality, for example open flyout.
hideFunctionFunction to hide wanted functionality, for example close flyout.
getTitleStringGuided tour step title
getContentStringGuided tour step content
getLinksStringGuided tour step links

Examples

Add example guide step to latest step in fuided tour:

var sb = Oskari.getSandbox();
sb.postRequestByName('Guidedtour.AddToGuidedTourRequest', [{
    bundleName: 'Test_guide',
    priority: 1000,
    show: function() {
        console.log('show test guide step');
    },
    hide: function() {
        console.log('hide test guide step');
    },
    getTitle: function(){
        return 'test';},
    getContent: function(){
        var content = jQuery('<div></div>');
        content.append('test message');
        return content;
    },
    getLinks: function(){
        return null
    }
}]);

Related api