Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt angular: ngeo.query #3290

Merged
merged 16 commits into from
Dec 20, 2017
4 changes: 2 additions & 2 deletions contribs/gmf/examples/displayquerygrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ goog.require('gmf.mapDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG21781');
/** @suppress {extraRequire} */
goog.require('ngeo.bboxQueryDirective');
goog.require('ngeo.query.bboxQueryComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.btnDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.mapQueryDirective');
goog.require('ngeo.query.mapQueryComponent');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
Expand Down
4 changes: 2 additions & 2 deletions contribs/gmf/examples/displayquerywindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ goog.require('gmf.mapDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG21781');
/** @suppress {extraRequire} */
goog.require('ngeo.bboxQueryDirective');
goog.require('ngeo.query.bboxQueryComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.btnDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.mapQueryDirective');
goog.require('ngeo.query.mapQueryComponent');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
Expand Down
4 changes: 2 additions & 2 deletions contribs/gmf/examples/filterselector.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ goog.require('gmf.layertreeComponent');
/** @suppress {extraRequire} */
goog.require('gmf.mapDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.bboxQueryDirective');
goog.require('ngeo.query.bboxQueryComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.mapQueryDirective');
goog.require('ngeo.query.mapQueryComponent');
goog.require('ngeo.ToolActivate');
goog.require('ngeo.ToolActivateMgr');
/** @suppress {extraRequire} */
Expand Down
4 changes: 2 additions & 2 deletions contribs/gmf/examples/importdatasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ goog.require('gmf.layertreeComponent');
/** @suppress {extraRequire} */
goog.require('gmf.mapDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.bboxQueryDirective');
goog.require('ngeo.query.bboxQueryComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.mapQueryDirective');
goog.require('ngeo.query.mapQueryComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.proj.EPSG21781');
goog.require('ol.Map');
Expand Down
6 changes: 3 additions & 3 deletions contribs/gmf/src/controllers/AbstractAppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ goog.require('gmf.themeselectorComponent');
/** @suppress {extraRequire} */
goog.require('ngeo.filters');
/** @suppress {extraRequire} */
goog.require('ngeo.mapQueryDirective');
goog.require('ngeo.query.mapQueryComponent');
goog.require('ngeo.GetBrowserLanguage');
/** @suppress {extraRequire} */
goog.require('ngeo.MapQuerent');
goog.require('ngeo.query.MapQuerent');
goog.require('ngeo.ToolActivate');
/** @suppress {extraRequire} */
goog.require('ngeo.ToolActivateMgr');
Expand Down Expand Up @@ -280,7 +280,7 @@ gmf.AbstractAppController = function(config, $scope, $injector) {
this.printActive = false;

/**
* @type {ngeo.MapQuerent}
* @type {ngeo.query.MapQuerent}
* @private
*/
this.ngeoMapQuerent_ = $injector.get('ngeoMapQuerent');
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/src/controllers/AbstractDesktopController.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ goog.provide('gmf.AbstractDesktopController');
goog.require('gmf');
goog.require('gmf.AbstractAppController');
/** @suppress {extraRequire} */
goog.require('ngeo.bboxQueryDirective');
goog.require('ngeo.query.bboxQueryComponent');
/** @suppress {extraRequire} */
goog.require('gmf.contextualdataDirective');
/** @suppress {extraRequire} */
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/src/controllers/AbstractMobileController.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ goog.require('gmf.mobileNavDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.btnDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.mapQueryDirective');
goog.require('ngeo.query.mapQueryComponent');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.control.ScaleLine');
Expand Down
6 changes: 3 additions & 3 deletions contribs/gmf/src/directives/displayquerygrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ goog.provide('gmf.displayquerygridComponent');

goog.require('gmf');
/** @suppress {extraRequire} - required for `ngeoQueryResult` */
goog.require('ngeo.MapQuerent');
goog.require('ngeo.query.MapQuerent');
goog.require('ol.Collection');
goog.require('ol.style.Circle');
goog.require('ol.style.Fill');
Expand Down Expand Up @@ -112,7 +112,7 @@ gmf.module.component('gmfDisplayquerygrid', gmf.displayquerygridComponent);
* @param {angular.$injector} $injector Main injector.
* @param {!angular.Scope} $scope Angular scope.
* @param {ngeox.QueryResult} ngeoQueryResult ngeo query result.
* @param {ngeo.MapQuerent} ngeoMapQuerent ngeo map querent service.
* @param {ngeo.query.MapQuerent} ngeoMapQuerent ngeo map querent service.
* @param {ngeo.map.FeatureOverlayMgr} ngeoFeatureOverlayMgr The ngeo feature
* overlay manager service.
* @param {angular.$timeout} $timeout Angular timeout service.
Expand Down Expand Up @@ -150,7 +150,7 @@ gmf.DisplayquerygridController = function($injector, $scope, ngeoQueryResult, ng
this.ngeoQueryResult = ngeoQueryResult;

/**
* @type {ngeo.MapQuerent}
* @type {ngeo.query.MapQuerent}
* @private
*/
this.ngeoMapQuerent_ = ngeoMapQuerent;
Expand Down
6 changes: 3 additions & 3 deletions contribs/gmf/src/directives/displayquerywindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ goog.provide('gmf.displayquerywindowComponent');

goog.require('gmf');
/** @suppress {extraRequire} - required for `ngeoQueryResult` */
goog.require('ngeo.MapQuerent');
goog.require('ngeo.query.MapQuerent');
/** @suppress {extraRequire} */
goog.require('gmf.swipe');
goog.require('ol.Collection');
Expand Down Expand Up @@ -95,7 +95,7 @@ gmf.module.component('gmfDisplayquerywindow', gmf.displayquerywindowComponent);
* @param {!jQuery} $element Element.
* @param {!angular.Scope} $scope Angular scope.
* @param {!ngeox.QueryResult} ngeoQueryResult ngeo query result.
* @param {!ngeo.MapQuerent} ngeoMapQuerent ngeo map querent service.
* @param {!ngeo.query.MapQuerent} ngeoMapQuerent ngeo map querent service.
* @param {!ngeo.map.FeatureOverlayMgr} ngeoFeatureOverlayMgr The ngeo feature
* overlay manager service.
* @constructor
Expand Down Expand Up @@ -151,7 +151,7 @@ gmf.DisplayquerywindowController = function($element, $scope, ngeoQueryResult, n
};

/**
* @type {ngeo.MapQuerent}
* @type {ngeo.query.MapQuerent}
* @private
*/
this.ngeoMapQuerent_ = ngeoMapQuerent;
Expand Down
6 changes: 3 additions & 3 deletions contribs/gmf/src/directives/importdatasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ goog.require('gmf.datasource.ExternalDataSourcesManager');
goog.require('gmf.wmscapabilitylayertreenodeComponent');
/** @suppress {extraRequire} */
goog.require('gmf.wmtscapabilitylayertreeComponent');
goog.require('ngeo.Querent');
goog.require('ngeo.query.Querent');
goog.require('ngeo.datasource.OGC');


Expand All @@ -25,7 +25,7 @@ gmf.ImportdatasourceController = class {
* @param {!gmf.datasource.ExternalDataSourcesManager}
* gmfExternalDataSourcesManager GMF service responsible of managing
* external data sources.
* @param {!ngeo.Querent} ngeoQuerent Ngeo querent service.
* @param {!ngeo.query.Querent} ngeoQuerent Ngeo querent service.
* @private
* @struct
* @ngInject
Expand Down Expand Up @@ -71,7 +71,7 @@ gmf.ImportdatasourceController = class {
this.gmfExternalDataSourcesManager_ = gmfExternalDataSourcesManager;

/**
* @type {!ngeo.Querent}
* @type {!ngeo.query.Querent}
* @private
*/
this.ngeoQuerent_ = ngeoQuerent;
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/src/services/permalink.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ gmf.Permalink = function($q, $timeout, $rootScope, $injector, ngeoDebounce, ngeo
$injector.get('ngeoFeatureHelper') : null;

/**
* @type {?ngeo.Querent}
* @type {?ngeo.query.Querent}
* @private
*/
this.ngeoQuerent_ = $injector.has('ngeoQuerent') ?
Expand Down
6 changes: 3 additions & 3 deletions contribs/gmf/src/services/querymanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ goog.provide('gmf.QueryManager');
goog.require('ol.events');
goog.require('gmf');
goog.require('gmf.Themes');
goog.require('ngeo.Query');
goog.require('ngeo.query.Service');


/**
Expand All @@ -20,7 +20,7 @@ goog.require('ngeo.Query');
*
* @constructor
* @struct
* @param {!ngeo.Query} ngeoQuery The ngeo Query service.
* @param {!ngeo.query.Service} ngeoQuery The ngeo Query service.
* @param {!gmf.Themes} gmfThemes The gmf Themes service.
* @param {!angular.$q} $q Angular q service
* @ngInject
Expand All @@ -30,7 +30,7 @@ goog.require('ngeo.Query');
gmf.QueryManager = function(ngeoQuery, gmfThemes, $q) {

/**
* @type {!ngeo.Query}
* @type {!ngeo.query.Service}
* @private
*/
this.ngeoQuery_ = ngeoQuery;
Expand Down
2 changes: 1 addition & 1 deletion examples/bboxquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>

<p id="desc">
This example shows how to use the <code><a href="../apidoc/ngeo.bboxQueryDirective.html" title="Read our documentation">ngeo-mobile-query</a></code>
This example shows how to use the <code><a href="../apidoc/ngeo.query.bboxQueryComponent.html" title="Read our documentation">ngeo-mobile-query</a></code>
directive. Press <code>Ctrl</code> (or <code>Cmd</code> on Mac) and draw a query bbox on the map.
</p>

Expand Down
6 changes: 3 additions & 3 deletions examples/bboxquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ goog.require('ngeo.datasource.DataSources');
goog.require('ngeo.datasource.OGC');
/** @suppress {extraRequire} */
goog.require('ngeo.btnDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.bboxQueryDirective');
goog.require('ngeo.query.module');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Image');
Expand All @@ -21,7 +20,8 @@ goog.require('ngeo.map.module');
/** @type {!angular.Module} */
app.module = angular.module('app', [
ngeo.module.name,
ngeo.map.module.name
ngeo.map.module.name,
ngeo.query.module.name
]);


Expand Down
2 changes: 1 addition & 1 deletion examples/mapquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</div>

<p id="desc">
This example shows how to use the <code><a href="../apidoc/ngeo.mapQueryDirective.html" title="Read our documentation">ngeo-map-query</a></code>
This example shows how to use the <code><a href="../apidoc/ngeo.query.mapQueryComponent.html" title="Read our documentation">ngeo-map-query</a></code>
directive. It also shows how the <code><a href="../apidoc/ngeo.ToolActivateMgr.html" title="Read our documentation">ngeo.ToolActivate</a></code> can be
used to make the directive inactive when an other tool becomes active.
The "Dummy" button here does nothing, but when toggled the query
Expand Down
2 changes: 1 addition & 1 deletion examples/mapquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ goog.require('ngeo.ToolActivateMgr');
/** @suppress {extraRequire} */
goog.require('ngeo.btnDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.mapQueryDirective');
goog.require('ngeo.query.mapQueryComponent');
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Image');
Expand Down
6 changes: 3 additions & 3 deletions src/datasource/datasourceshelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ goog.provide('ngeo.datasource.DataSourcesHelper');
goog.require('ngeo');
goog.require('ngeo.datasource.DataSource');
goog.require('ngeo.datasource.DataSources');
goog.require('ngeo.Querent');
goog.require('ngeo.query.Querent');
goog.require('ngeo.format.WFSAttribute');
goog.require('ol.events');

Expand All @@ -17,7 +17,7 @@ ngeo.datasource.DataSourcesHelper = class {
* @param {angular.$q} $q The Angular $q service.
* @param {ngeo.datasource.DataSources} ngeoDataSources Ngeo data source
* collection.
* @param {ngeo.Querent} ngeoQuerent Ngeo querent service.
* @param {ngeo.query.Querent} ngeoQuerent Ngeo querent service.
* @ngdoc service
* @ngname ngeoDataSourcesHelper
* @ngInject
Expand All @@ -39,7 +39,7 @@ ngeo.datasource.DataSourcesHelper = class {
this.collection_ = ngeoDataSources;

/**
* @type {ngeo.Querent}
* @type {ngeo.query.Querent}
* @private
*/
this.ngeoQuerent_ = ngeoQuerent;
Expand Down
6 changes: 3 additions & 3 deletions src/filter/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
goog.provide('ngeo.filter.component');

goog.require('ngeo');
goog.require('ngeo.MapQuerent');
goog.require('ngeo.query.MapQuerent');
/** @suppress {extraRequire} */
goog.require('ngeo.filter.ruleComponent');
/** @suppress {extraRequire} */
Expand Down Expand Up @@ -54,7 +54,7 @@ ngeo.filter.component.FilterController_ = class {
* @param {!angularGettext.Catalog} gettextCatalog Gettext service.
* @param {!angular.Scope} $scope Angular scope.
* @param {!angular.$timeout} $timeout Angular timeout service.
* @param {!ngeo.MapQuerent} ngeoMapQuerent The ngeo map querent service.
* @param {!ngeo.query.MapQuerent} ngeoMapQuerent The ngeo map querent service.
* @param {!ngeo.filter.RuleHelper} ngeoRuleHelper Ngeo rule helper service.
* @private
* @struct
Expand Down Expand Up @@ -131,7 +131,7 @@ ngeo.filter.component.FilterController_ = class {
this.timeout_ = $timeout;

/**
* @type {!ngeo.MapQuerent}
* @type {!ngeo.query.MapQuerent}
* @private
*/
this.ngeoMapQuerent_ = ngeoMapQuerent;
Expand Down
2 changes: 2 additions & 0 deletions src/query/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extends:
- ../.eslintrc-googshift.yaml
20 changes: 14 additions & 6 deletions src/services/mapquerent.js → src/query/MapQuerent.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
goog.provide('ngeo.MapQuerent');
goog.provide('ngeo.query.MapQuerent');

goog.require('ngeo');
goog.require('ngeo.Querent');
goog.require('ngeo.query.Querent');
goog.require('ngeo.datasource.DataSourcesHelper');
goog.require('ol.obj');


/**
Expand All @@ -16,7 +17,7 @@ ngeo.module.value('ngeoQueryResult', /** @type {ngeox.QueryResult} */ ({
}));


ngeo.MapQuerent = class {
ngeo.query.MapQuerent = class {

/**
* The ngeo Map Querent is the service bound to a map that issues
Expand All @@ -31,7 +32,7 @@ ngeo.MapQuerent = class {
* data source objects.
* @param {ngeo.datasource.DataSourcesHelper} ngeoDataSourcesHelper Ngeo data
* sources helper service.
* @param {ngeo.Querent} ngeoQuerent The ngeo querent service.
* @param {ngeo.query.Querent} ngeoQuerent The ngeo querent service.
* @param {ngeox.QueryResult} ngeoQueryResult The ngeo query result service.
* @ngdoc service
* @ngname ngeoQuerent
Expand All @@ -57,7 +58,7 @@ ngeo.MapQuerent = class {
this.ngeoDataSourcesHelper_ = ngeoDataSourcesHelper;

/**
* @type {ngeo.Querent}
* @type {ngeo.query.Querent}
* @private
*/
this.ngeoQuerent_ = ngeoQuerent;
Expand Down Expand Up @@ -222,4 +223,11 @@ ngeo.MapQuerent = class {
};


ngeo.module.service('ngeoMapQuerent', ngeo.MapQuerent);
/**
* @type {!angular.Module}
*/
ngeo.query.MapQuerent.module = angular.module('ngeoMapQuerent', [
ngeo.query.Querent.module.name,
]);
ngeo.query.MapQuerent.module.service('ngeoMapQuerent', ngeo.query.MapQuerent);
ngeo.module.requires.push(ngeo.query.MapQuerent.module.name);
Loading