Additional changes to work with user projection

This commit is contained in:
Tim Schaub
2019-09-24 19:58:53 +02:00
parent 7be4835144
commit b1f0b6997b
11 changed files with 81 additions and 21 deletions

View File

@@ -206,7 +206,7 @@ class CanvasBuilder extends VectorContext {
* @inheritDoc.
*/
drawCustom(geometry, feature, renderer) {
this.beginGeometry(feature);
this.beginGeometry(geometry, feature);
const type = geometry.getType();
const stride = geometry.getStride();
const builderBegin = this.coordinates.length;
@@ -253,12 +253,14 @@ class CanvasBuilder extends VectorContext {
/**
* @protected
* @param {import("../../geom/Geometry").default|import("../Feature.js").default} geometry The geometry.
* @param {import("../../Feature.js").FeatureLike} feature Feature.
*/
beginGeometry(feature) {
this.beginGeometryInstruction1_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];
beginGeometry(geometry, feature) {
const extent = geometry.getExtent();
this.beginGeometryInstruction1_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0, extent];
this.instructions.push(this.beginGeometryInstruction1_);
this.beginGeometryInstruction2_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];
this.beginGeometryInstruction2_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0, extent];
this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);
}