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.3 into master #4572

Merged
merged 7 commits into from
Jan 31, 2019
5 changes: 3 additions & 2 deletions contribs/gmf/src/controllers/AbstractAppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,15 @@ export function AbstractAppController(config, map, $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
10 changes: 9 additions & 1 deletion src/query/MapQuerent.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import ngeoMiscFeatureHelper from 'ngeo/misc/FeatureHelper.js';
* @property {string} [featurePrefix=feature] The feature prefix for WFS GetFeature requests.
* @property {string} [geometryName=geom] The name of the geometry property for WFS GetFeature requests.
* @property {boolean} [cursorHover]
* @property {boolean} [bboxAsGETParam=false] Pass the queried bbox as a parameter of the GET query on WFS requests.
*/


Expand Down Expand Up @@ -118,6 +119,12 @@ export class MapQuerent {
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 @@ -161,7 +168,8 @@ export class MapQuerent {
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(
Expand Down
4 changes: 4 additions & 0 deletions src/query/Querent.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,10 @@ export class Querent {
let url;
const params = {};

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

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

Expand Down