Address review comments
This commit is contained in:
@@ -3,7 +3,7 @@ layout: example.html
|
||||
title: Image Vector Layer
|
||||
shortdesc: Example of an image vector layer.
|
||||
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"
|
||||
---
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -4276,12 +4276,13 @@ olx.layer.VectorOptions;
|
||||
|
||||
|
||||
/**
|
||||
* Render mode for vectors:
|
||||
* * `'image'`: Vectors are rendered as images. Great performance, but
|
||||
* Render mode for vector layers:
|
||||
* * `'image'`: Vector layers are rendered as images. Great performance, but
|
||||
* point symbols and texts are always rotated with the view and pixels are
|
||||
* 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.
|
||||
* Default is `vector`.
|
||||
* @type {ol.layer.VectorRenderType|string|undefined}
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -3,10 +3,10 @@ goog.provide('ol.layer.VectorRenderType');
|
||||
/**
|
||||
* @enum {string}
|
||||
* 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
|
||||
* 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.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -123,7 +123,7 @@ ol.renderer.canvas.IntermediateCanvas.prototype.forEachLayerAtCoordinate = funct
|
||||
}
|
||||
|
||||
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
|
||||
return ol.renderer.canvas.Layer.prototype.forEachLayerAtCoordinate.apply(this, arguments);
|
||||
} else {
|
||||
|
||||
@@ -248,7 +248,7 @@ ol.renderer.webgl.ImageLayer.prototype.forEachLayerAtPixel = function(pixel, fra
|
||||
}
|
||||
|
||||
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
|
||||
var coordinate = ol.transform.apply(
|
||||
frameState.pixelToCoordinateTransform, pixel.slice());
|
||||
|
||||
Reference in New Issue
Block a user