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

Merge 2.2 into 2.3 #4571

Merged
merged 5 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions contribs/gmf/src/controllers/AbstractAppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,15 @@ const exports = function(config, $scope, $injector) {
}
});

// Reload theme and background layer when login status changes.
// Reload theme when login status changes.
const previousThemeName = this.gmfThemeManager.getThemeName();
this.gmfThemeManager.setThemeName('', true);
if (evt.type !== 'ready') {
this.updateCurrentTheme_(previousThemeName);
}
// Reload themes when login status changes.
// Reload themes and background layer when login status changes.
this.gmfThemes_.loadThemes(roleId);
this.setDefaultBackground_(null);
this.updateHasEditableLayers_();
};

Expand Down
18 changes: 18 additions & 0 deletions options/ngeox.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ ngeox.Download;
* The options to use when sending GetFeature/GetFeatureInfo requests using
* the querent or map query service.
* @typedef {{
* bboxAsGETParam: (boolean|undefined),
* coordinate: (ol.Coordinate|undefined),
* dataSources: (Array.<ngeox.datasource.DataSource>|undefined),
* extent: (ol.Extent|undefined),
Expand All @@ -225,6 +226,14 @@ ngeox.Download;
ngeox.IssueGetFeaturesOptions;


/**
* Pass the queried bbox as a parameter of the GET query on WFS requests.
* Default to false.
* @type {boolean|undefined}
*/
ngeox.IssueGetFeaturesOptions.prototype.bboxAsGETParam;


/**
* The coordinate to issue the requests with, which can end up with either
* WMS or WFS requests.
Expand Down Expand Up @@ -719,6 +728,7 @@ ngeox.QueryResultSource.prototype.totalFeatureCount;
/**
* The options for the query service.
* @typedef {{
* bboxAsGETParam: (boolean|undefined),
* limit: (number|undefined),
* queryCountFirst: (boolean|undefined),
* sourceIdsProperty: (string|undefined),
Expand All @@ -731,6 +741,14 @@ ngeox.QueryResultSource.prototype.totalFeatureCount;
ngeox.QueryOptions;


/**
* Pass the queried bbox as a parameter of the GET query on WFS requests.
* Default to false.
* @type {boolean|undefined}
*/
ngeox.QueryOptions.prototype.bboxAsGETParam;


/**
* The maximum number of records per request the query service should ask.
* Defaults to `50`. Note that sources sharing the same URL are combined
Expand Down
9 changes: 8 additions & 1 deletion src/query/MapQuerent.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ const exports = class {
this.tolerancePx_ = options.tolerance !== undefined ?
options.tolerance : 3;

/**
* @type {boolean}
* @private
*/
this.bboxAsGETParam_ = options.bboxAsGETParam || false;

/**
* A hash of data source names classified by ids.
* @type {Object.<number, string>}
Expand Down Expand Up @@ -115,7 +121,8 @@ const exports = class {
queryableDataSources: queryableDataSources,
limit: limit,
tolerancePx: this.tolerancePx_,
wfsCount: this.queryCountFirst_
wfsCount: this.queryCountFirst_,
bboxAsGETParam: this.bboxAsGETParam_
});
this.result_.pending = true;
this.ngeoQuerent_.issue(options).then(this.handleResult_.bind(this));
Expand Down
4 changes: 4 additions & 0 deletions src/query/Querent.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,10 @@ const exports = class {
let url;
const params = {};

if (options.bboxAsGETParam && bbox) {
params['bbox'] = bbox.join(',');
}

// (3) Build query options
for (const dataSource of dataSources) {

Expand Down