Closed chrismayer closed 5 years ago
This change is based on the logic of accessing the OpenLayers map object here: https://github.com/opengeo/gxp/blob/master/src/script/plugins/LayerSource.js#L82
@chrismayer how can I reproduce this issue? How are you using it? This plugin should be in mapPlugins and not in the tools section.
@bartvde I use this within a gxp.Viewer instance inside the tools section, like this:
new gxp.Viewer ({
...
tools : [{
ptype: 'gxp_loadingindicator',
loadingMapMessage: 'loading...'
}],
...
});
which seems to be wrong according to your comment. What is the best way to find the right way? Did I miss a hint here in the API docs http://gxp.opengeo.org/master/doc/lib/plugins/LoadingIndicator.html ?
To be honest, it's only mentioned if you look at mapPlugins in the Viewer api docs:
http://gxp.opengeo.org/master/doc/lib/widgets/Viewer.html
mapPlugins Array(Ext.util.Observable) Any plugins to be added to the map panel, e.g. gxp.plugins.LoadingIndicator.
Does it work for you this way?
Now it compiles, but unfortunately the loading mask does not appear (without error). But this seems to be a different problem.
Maybe mentioning vice versa in the API docs would be useful to avoid the error I did. So in http://gxp.opengeo.org/master/doc/lib/plugins/LoadingIndicator.html we could say something like "could be used in the 'mapPlugins' array".
If the core developers would give a convention for this (howto tag this for API docs) the docs could be improved by other developers too and the API docs would improve.
What do you think?
Thanks, Chris
... error is thrown: "Uncaught TypeError: Cannot call method 'register' of undefined" when this plugin is being initialized inside a viewer.