-
Notifications
You must be signed in to change notification settings - Fork 5
How to create an own guide4you module
Sascha Klemenjak edited this page May 17, 2017
·
1 revision
In case you want to subclass and/or extend the guide4you code and add own controls or layer types to the config files, this can be done like this:
- Follow the install instructions on https://github.com/KlausBenndorf/guide4you#how-to-install-and-build-guide4you
- create conf folder by copying the contents of conf/simple (or conf/full).
mkdir conf && cp node_modules/guice4you/conf/simple/* conf/*
- create a
MyModule.js
file anywhere which extends from Module (https://github.com/KlausBenndorf/guide4you/blob/master/src/Module.js). See the comments in the code to see which methods for control creating and layer creating can be overwritten. For an example see https://github.com/KlausBenndorf/guide4you-module-search/blob/master/src/SearchModule.js - Add the Module to the map in the entry.js file like this: https://github.com/KlausBenndorf/guide4you-module-search/blob/master/conf/entry.js#L44