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

Order print layers by z-index #3663

Merged
merged 1 commit into from
Mar 15, 2018
Merged

Order print layers by z-index #3663

merged 1 commit into from
Mar 15, 2018

Conversation

llienher
Copy link
Member

As the map is ordered by z-index with OL, the print need to replicate this otherwise layers are unsorted and given to mapfish in that state...

Copy link
Member

@ger-benjamin ger-benjamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@@ -225,6 +225,17 @@ ngeo.Print.prototype.encodeMap_ = function(map, scale, object) {
goog.asserts.assert(mapLayerGroup);
this.printNativeAngle_ = !(mapLayerGroup.get('printNativeAngle') === false);
let layers = this.ngeoLayerHelper_.getFlatLayers(mapLayerGroup);

// Sort the layer by ZIndex
layers.sort((layer_a, layer_b) => {
Copy link
Member

@gberaudo gberaudo Mar 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@llienher llienher force-pushed the print_zindex_layers branch from 468acca to 0f7e069 Compare March 15, 2018 15:34
@llienher llienher merged commit c829578 into 2.2 Mar 15, 2018
@llienher llienher deleted the print_zindex_layers branch March 15, 2018 16:07
@sbrunner sbrunner added this to the 2.2 milestone Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants