Address review comments
This commit is contained in:
@@ -3,7 +3,7 @@ layout: example.html
|
|||||||
title: Image Vector Layer
|
title: Image Vector Layer
|
||||||
shortdesc: Example of an image vector layer.
|
shortdesc: Example of an image vector layer.
|
||||||
docs: >
|
docs: >
|
||||||
<p>This example uses <code>ol.layer.Vector</code> with `renderMode: 'image'`. This mode results in faster rendering during interaction and animations, at the cost of less accurate rendeering.</p>
|
<p>This example uses <code>ol.layer.Vector</code> with `renderMode: 'image'`. This mode results in faster rendering during interaction and animations, at the cost of less accurate rendering.</p>
|
||||||
tags: "vector, image"
|
tags: "vector, image"
|
||||||
---
|
---
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
|
|||||||
+4
-3
@@ -4276,12 +4276,13 @@ olx.layer.VectorOptions;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render mode for vectors:
|
* Render mode for vector layers:
|
||||||
* * `'image'`: Vectors are rendered as images. Great performance, but
|
* * `'image'`: Vector layers are rendered as images. Great performance, but
|
||||||
* point symbols and texts are always rotated with the view and pixels are
|
* point symbols and texts are always rotated with the view and pixels are
|
||||||
* scaled during zoom animations.
|
* scaled during zoom animations.
|
||||||
* * `'vector'`: Vectors are rendered as vectors. Most accurate rendering
|
* * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering
|
||||||
* even during animations, but slower performance.
|
* even during animations, but slower performance.
|
||||||
|
* Default is `vector`.
|
||||||
* @type {ol.layer.VectorRenderType|string|undefined}
|
* @type {ol.layer.VectorRenderType|string|undefined}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ goog.provide('ol.layer.VectorRenderType');
|
|||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
* Render mode for vector layers:
|
* Render mode for vector layers:
|
||||||
* * `'image'`: Vector tiles are rendered as images. Great performance, but
|
* * `'image'`: Vector layers are rendered as images. Great performance, but
|
||||||
* point symbols and texts are always rotated with the view and pixels are
|
* point symbols and texts are always rotated with the view and pixels are
|
||||||
* scaled during zoom animations.
|
* scaled during zoom animations.
|
||||||
* * `'vector'`: Vector tiles are rendered as vectors. Most accurate rendering
|
* * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering
|
||||||
* even during animations, but slower performance.
|
* even during animations, but slower performance.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ ol.renderer.canvas.IntermediateCanvas.prototype.forEachLayerAtCoordinate = funct
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.getLayer().getSource().forEachFeatureAtCoordinate !== ol.nullFunction) {
|
if (this.getLayer().getSource().forEachFeatureAtCoordinate !== ol.nullFunction) {
|
||||||
// for ImageVector sources use the original hit-detection logic,
|
// for ImageCanvas sources use the original hit-detection logic,
|
||||||
// so that for example also transparent polygons are detected
|
// so that for example also transparent polygons are detected
|
||||||
return ol.renderer.canvas.Layer.prototype.forEachLayerAtCoordinate.apply(this, arguments);
|
return ol.renderer.canvas.Layer.prototype.forEachLayerAtCoordinate.apply(this, arguments);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ ol.renderer.webgl.ImageLayer.prototype.forEachLayerAtPixel = function(pixel, fra
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.getLayer().getSource().forEachFeatureAtCoordinate !== ol.nullFunction) {
|
if (this.getLayer().getSource().forEachFeatureAtCoordinate !== ol.nullFunction) {
|
||||||
// for ImageVector sources use the original hit-detection logic,
|
// for ImageCanvas sources use the original hit-detection logic,
|
||||||
// so that for example also transparent polygons are detected
|
// so that for example also transparent polygons are detected
|
||||||
var coordinate = ol.transform.apply(
|
var coordinate = ol.transform.apply(
|
||||||
frameState.pixelToCoordinateTransform, pixel.slice());
|
frameState.pixelToCoordinateTransform, pixel.slice());
|
||||||
|
|||||||
Reference in New Issue
Block a user