possible fix for #271 'undefined' issue
work in progress - api for java app to interface with the layer chooser