Skip to content

Commit

Permalink
Merge pull request #4793 from camptocamp/allow_overriding_vector_encoder
Browse files Browse the repository at this point in the history
Allow overriding vector encoder
  • Loading branch information
gberaudo committed Apr 3, 2019
2 parents 2a533c9 + f077951 commit a789a41
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/print/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ const exports = function(url, $http, gettextCatalog, ngeoLayerHelper) {

/**
* @type {ngeo.print.VectorEncoder}
* @private
* @protected
*/
this.vectorEncoder_ = new ngeoPrintVectorEncoder();
this.vectorEncoder = new ngeoPrintVectorEncoder();

/**
* @type {boolean}
Expand Down Expand Up @@ -205,10 +205,18 @@ exports.prototype.encodeLayer = function(arr, layer, resolution) {
} else if (layer instanceof olLayerTile) {
this.encodeTileLayer_(arr, layer);
} else if (layer instanceof olLayerVector) {
this.vectorEncoder_.encodeVectorLayer(arr, layer, resolution);
this.encodeVectorLayer(arr, layer, resolution);
}
};

/**
* @param {Array.<MapFishPrintLayer>} arr Array.
* @param {ol.layer.Vector} layer Layer.
* @param {number} resolution Resolution.
*/
exports.prototype.encodeVectorLayer = function(arr, layer, resolution) {
this.vectorEncoder.encodeVectorLayer(arr, layer, resolution);
};

/**
* @param {Array.<MapFishPrintLayer>} arr Array.
Expand Down

0 comments on commit a789a41

Please sign in to comment.