Skip to content

Commit

Permalink
Start to debug gmf examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ger-benjamin committed Dec 12, 2017
1 parent c22e506 commit 7ca9152
Show file tree
Hide file tree
Showing 25 changed files with 119 additions and 102 deletions.
4 changes: 2 additions & 2 deletions contribs/gmf/apps/desktop/js/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ goog.provide('app.desktop.Controller');
goog.require('app');
goog.require('gmf.AbstractDesktopController');
/** @suppress {extraRequire} */
goog.require('ngeo.googlestreetviewComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG2056');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG21781');

goog.require('ngeo.googlestreetview.component');


/**
* @param {angular.Scope} $scope Scope.
Expand Down
4 changes: 2 additions & 2 deletions contribs/gmf/apps/desktop_alt/js/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ goog.require('gmf.AbstractDesktopController');
/** @suppress {extraRequire} */
goog.require('gmf.importdatasourceComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.googlestreetviewComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG2056');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG21781');

goog.require('ngeo.googlestreetview.component');


gmf.module.value('ngeoQueryOptions', {
'limit': 20,
Expand Down
4 changes: 2 additions & 2 deletions contribs/gmf/examples/displayquerygrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ goog.require('ngeo.bboxQueryDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.btnDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.gridComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.mapQueryDirective');
goog.require('ol.Map');
goog.require('ol.View');
Expand All @@ -27,12 +25,14 @@ goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');

goog.require('ngeo.grid.module');
goog.require('ngeo.map.module');


/** @type {!angular.Module} **/
gmfapp.module = angular.module('gmfapp', [
gmf.module.name, // Change me when gmf.Theme and other dependencies are in a module
ngeo.grid.module.name,
ngeo.map.module.name // for ngeo.map.FeatureOverlay, perhaps remove me
]);

Expand Down
12 changes: 9 additions & 3 deletions contribs/gmf/examples/layertree.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,23 @@ goog.require('gmf.disclaimerComponent');
goog.require('gmf.layertreeComponent');
/** @suppress {extraRequire} */
goog.require('gmf.mapDirective');
goog.require('ngeo.Location');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG21781');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
goog.require('ol.source.OSM');

goog.require('ngeo.statemanager.Location');
goog.require('ngeo.layertree.module');


/** @type {!angular.Module} **/
gmfapp.module = angular.module('gmfapp', ['gmf']);
gmfapp.module = angular.module('gmfapp', [
gmf.module.name, // Change when other dependencies are in a module
ngeo.statemanager.Location.module.name,
ngeo.layertree.module.name
]);


gmfapp.module.value('gmfTreeUrl',
Expand All @@ -31,7 +37,7 @@ gmfapp.module.value('gmfTreeUrl',
* @param {gmf.Themes} gmfThemes The gmf themes service.
* @param {gmf.TreeManager} gmfTreeManager gmf Tree Manager service.
* @param {gmf.ThemeManager} gmfThemeManager gmf Theme Manager service.
* @param {ngeo.Location} ngeoLocation ngeo location service.
* @param {ngeo.statemanager.Location} ngeoLocation ngeo location service.
* @ngInject
*/
gmfapp.MainController = function(gmfThemes, gmfTreeManager, gmfThemeManager, ngeoLocation) {
Expand Down
9 changes: 6 additions & 3 deletions contribs/gmf/examples/layertreeadd.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@ goog.require('gmf.disclaimerComponent');
goog.require('gmf.layertreeComponent');
/** @suppress {extraRequire} */
goog.require('gmf.mapDirective');
goog.require('ngeo.Location');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG21781');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
goog.require('ol.source.OSM');

goog.require('ngeo.statemanager.Location');

/** @type {!angular.Module} **/
gmfapp.module = angular.module('gmfapp', ['gmf']);
gmfapp.module = angular.module('gmfapp', [
gmf.module.name, // Change me other dependencies are in a module
ngeo.statemanager.Location.module.name
]);


gmfapp.module.value('gmfTreeUrl',
Expand All @@ -31,7 +34,7 @@ gmfapp.module.value('gmfTreeUrl',
* @param {gmf.Themes} gmfThemes The gmf themes service.
* @param {gmf.TreeManager} gmfTreeManager gmf Tree Manager service.
* @param {gmf.ThemeManager} gmfThemeManager gmf Tree Manager service.
* @param {ngeo.Location} ngeoLocation ngeo location service.
* @param {ngeo.statemanager.Location} ngeoLocation ngeo location service.
* @ngInject
*/
gmfapp.MainController = function(gmfThemes, gmfTreeManager, gmfThemeManager, ngeoLocation) {
Expand Down
7 changes: 4 additions & 3 deletions contribs/gmf/src/controllers/AbstractAppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ goog.require('ngeo.mapQueryDirective');
goog.require('ngeo.GetBrowserLanguage');
/** @suppress {extraRequire} */
goog.require('ngeo.MapQuerent');
goog.require('ngeo.StateManager');
goog.require('ngeo.ToolActivate');
/** @suppress {extraRequire} */
goog.require('ngeo.ToolActivateMgr');
Expand All @@ -40,6 +39,8 @@ goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');

goog.require('ngeo.statemanager.module');


gmf.module.value('ngeoExportFeatureFormats', [
ngeo.FeatureHelper.FormatType.KML,
Expand All @@ -65,7 +66,7 @@ gmf.AbstractAppController = function(config, $scope, $injector) {

/**
* Location service
* @type {ngeo.Location}
* @type {ngeo.statemanager.Location}
*/
this.ngeoLocation = $injector.get('ngeoLocation');
if (this.ngeoLocation.hasParam('debug')) {
Expand Down Expand Up @@ -341,7 +342,7 @@ gmf.AbstractAppController = function(config, $scope, $injector) {
this.getBrowserLanguage = $injector.get('ngeoGetBrowserLanguage');

/**
* @type {ngeo.StateManager}
* @type {ngeo.statemanager.Service}
*/
this.stateManager = $injector.get('ngeoStateManager');

Expand Down
4 changes: 2 additions & 2 deletions contribs/gmf/src/controllers/AbstractMobileController.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ goog.require('gmf.mobileNavDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.btnDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.mobileGeolocationDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.mapQueryDirective');
goog.require('ol.Map');
goog.require('ol.View');
Expand All @@ -26,6 +24,8 @@ goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');

goog.require('ngeo.geolocation.mobile');

gmf.module.value('isMobile', true);

gmf.module.value('ngeoQueryOptions', {
Expand Down
10 changes: 5 additions & 5 deletions contribs/gmf/src/datasource/datasourcesmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ gmf.datasource.DataSourcesManager = class {
* are added or removed, pushing it to the cache or removing it from the
* cache.
*
* @param {Array.<ngeo.LayertreeController>|undefined} value List of tree
* @param {Array.<ngeo.layertree.Controller>|undefined} value List of tree
* controllers.
* @private
*/
Expand Down Expand Up @@ -492,7 +492,7 @@ gmf.datasource.DataSourcesManager = class {
* Also, set its according data source. Finally, add the data source to
* the ngeo collection.
*
* @param {ngeo.LayertreeController} treeCtrl Layertree controller to add
* @param {ngeo.layertree.Controller} treeCtrl Layertree controller to add
* @private
*/
addTreeCtrlToCache_(treeCtrl) {
Expand Down Expand Up @@ -602,7 +602,7 @@ gmf.datasource.DataSourcesManager = class {
* Note: The possible states can only be 'on' or 'off', because the
* layertree controller being a 'leaf'.
*
* @param {ngeo.LayertreeController} treeCtrl The layer tree controller
* @param {ngeo.layertree.Controller} treeCtrl The layer tree controller
* @param {string|undefined} newVal New state value
* @private
*/
Expand Down Expand Up @@ -639,7 +639,7 @@ gmf.datasource.DataSourcesManager = class {
/**
* Returns a layertree controller cache item, if it exists.
*
* @param {ngeo.LayertreeController} treeCtrl The layer tree controller
* @param {ngeo.layertree.Controller} treeCtrl The layer tree controller
* @return {gmf.datasource.DataSourcesManager.TreeCtrlCacheItem} Cache item
* @private
*/
Expand Down Expand Up @@ -834,7 +834,7 @@ gmf.datasource.DataSourcesManager.TreeCtrlCache;
* stateWatcherUnregister: (Function),
* timeLowerValueWatcherUnregister: (Function|undefined),
* timeUpperValueWatcherUnregister: (Function|undefined),
* treeCtrl: (ngeo.LayertreeController),
* treeCtrl: (ngeo.layertree.Controller),
* wmsLayer: (ol.layer.Image|undefined)
* }}
*/
Expand Down
12 changes: 6 additions & 6 deletions contribs/gmf/src/directives/displayquerygrid.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
goog.provide('gmf.displayquerygridComponent');

goog.require('gmf');
goog.require('ngeo.CsvDownload');
goog.require('ngeo.GridConfig');
/** @suppress {extraRequire} */
goog.require('ngeo.gridComponent');
/** @suppress {extraRequire} - required for `ngeoQueryResult` */
goog.require('ngeo.MapQuerent');
goog.require('ol.Collection');
Expand All @@ -13,10 +9,14 @@ goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');

goog.require('ngeo.download.module');
goog.require('ngeo.grid.module');
goog.require('ngeo.map.FeatureOverlayMgr');


// In the future module declaration, don't forget to require:
// - ngeo.download.module.name
// - ngeo.grid.module.name
// - ngeo.map.FeatureOverlayMgr.module.name


Expand Down Expand Up @@ -114,7 +114,7 @@ gmf.module.component('gmfDisplayquerygrid', gmf.displayquerygridComponent);
* @param {ngeo.map.FeatureOverlayMgr} ngeoFeatureOverlayMgr The ngeo feature
* overlay manager service.
* @param {angular.$timeout} $timeout Angular timeout service.
* @param {ngeo.CsvDownload} ngeoCsvDownload CSV download service.
* @param {ngeo.download.Csv} ngeoCsvDownload CSV download service.
* @param {angular.JQLite} $element Element.
* @constructor
* @private
Expand Down Expand Up @@ -154,7 +154,7 @@ gmf.DisplayquerygridController = function($injector, $scope, ngeoQueryResult, ng
this.ngeoMapQuerent_ = ngeoMapQuerent;

/**
* @type {ngeo.CsvDownload}
* @type {ngeo.download.Csv}
* @private
*/
this.ngeoCsvDownload_ = ngeoCsvDownload;
Expand Down
4 changes: 2 additions & 2 deletions contribs/gmf/src/directives/editfeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ goog.require('ol.style.Text');
* @htmlAttribute {boolean} gmf-editfeature-dirty Flag that is toggled as soon
* as the feature changes, i.e. if any of its properties change, which
* includes the geometry.
* @htmlAttribute {ngeo.LayertreeController} gmf-editfeature-editabletreectrl
* @htmlAttribute {ngeo.layertree.Controller} gmf-editfeature-editabletreectrl
* A reference to the editable Layertree controller, which contains a
* a reference to the node and WMS layer.
* @htmlAttribute {ol.Map} gmf-editfeature-map The map.
Expand Down Expand Up @@ -133,7 +133,7 @@ gmf.EditfeatureController = function($element, $q, $scope, $timeout,
this.dirty;

/**
* @type {ngeo.LayertreeController}
* @type {ngeo.layertree.Controller}
* @export
*/
this.editableTreeCtrl;
Expand Down
6 changes: 3 additions & 3 deletions contribs/gmf/src/directives/editfeatureselector.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ gmf.EditfeatureselectorController = function($scope, $timeout, gmfThemes,
this.gmfTreeManager_ = gmfTreeManager;

/**
* @param {Array.<ngeo.LayertreeController>} value First level controllers.
* @param {Array.<ngeo.layertree.Controller>} value First level controllers.
*/
const updateEditableTreeCtrls = function(value) {
// Timeout required, because the collection event is fired before the
Expand Down Expand Up @@ -167,14 +167,14 @@ gmf.EditfeatureselectorController = function($scope, $timeout, gmfThemes,

/**
* List of editable Layertree controllers.
* @type {Array.<ngeo.LayertreeController>}
* @type {Array.<ngeo.layertree.Controller>}
* @export
*/
this.editableTreeCtrls = [];

/**
* The currently selected Layertree controller.
* @type {?ngeo.LayertreeController}
* @type {?ngeo.layertree.Controller}
* @export
*/
this.selectedEditableTreeCtrl = null;
Expand Down
Loading

0 comments on commit 7ca9152

Please sign in to comment.