Handle righthanded polygons in format, not source
This commit is contained in:
@@ -24,6 +24,12 @@ ol.format.Feature = function() {
|
||||
* @type {ol.proj.Projection}
|
||||
*/
|
||||
this.defaultDataProjection = null;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.rightHandedPolygons = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -53,6 +59,14 @@ ol.format.Feature.prototype.getReadOptions = function(source, opt_options) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
ol.format.Feature.prototype.getRightHandedPolygons = function() {
|
||||
return this.rightHandedPolygons;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Sets the `defaultDataProjection` on the options, if no `dataProjection`
|
||||
* is set.
|
||||
|
||||
@@ -75,6 +75,8 @@ ol.format.MVT = function(opt_options) {
|
||||
*/
|
||||
this.layers_ = goog.isDef(options.layers) ? options.layers : null;
|
||||
|
||||
this.rightHandedPolygons = true;
|
||||
|
||||
};
|
||||
goog.inherits(ol.format.MVT, ol.format.Feature);
|
||||
|
||||
|
||||
@@ -196,7 +196,8 @@ ol.renderer.canvas.VectorTileLayer.prototype.createReplayGroup = function(tile,
|
||||
var tileResolution = pixelSpace ? source.getTilePixelRatio() : resolution;
|
||||
replayState.dirty = false;
|
||||
var replayGroup = new ol.render.canvas.ReplayGroup(0, extent,
|
||||
tileResolution, layer.getRenderBuffer(), source.getRightHandedPolygons());
|
||||
tileResolution, layer.getRenderBuffer(),
|
||||
tile.getFormat().getRightHandedPolygons());
|
||||
var squaredTolerance = ol.renderer.vector.getSquaredTolerance(
|
||||
tileResolution, pixelRatio);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user