Introduce ol.render.Feature
This commit is contained in:
@@ -527,8 +527,8 @@ ol.render.canvas.Immediate.prototype.drawGeometryCollectionGeometry =
|
||||
* Render a Point geometry into the canvas. Rendering is immediate and uses
|
||||
* the current style.
|
||||
*
|
||||
* @param {ol.geom.Point} pointGeometry Point geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.Point|ol.render.Feature} pointGeometry Point geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @api
|
||||
*/
|
||||
ol.render.canvas.Immediate.prototype.drawPointGeometry =
|
||||
@@ -548,8 +548,9 @@ ol.render.canvas.Immediate.prototype.drawPointGeometry =
|
||||
* Render a MultiPoint geometry into the canvas. Rendering is immediate and
|
||||
* uses the current style.
|
||||
*
|
||||
* @param {ol.geom.MultiPoint} multiPointGeometry MultiPoint geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.MultiPoint|ol.render.Feature} multiPointGeometry MultiPoint
|
||||
* geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @api
|
||||
*/
|
||||
ol.render.canvas.Immediate.prototype.drawMultiPointGeometry =
|
||||
@@ -569,8 +570,9 @@ ol.render.canvas.Immediate.prototype.drawMultiPointGeometry =
|
||||
* Render a LineString into the canvas. Rendering is immediate and uses
|
||||
* the current style.
|
||||
*
|
||||
* @param {ol.geom.LineString} lineStringGeometry Line string geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.LineString|ol.render.Feature} lineStringGeometry Line
|
||||
* string geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @api
|
||||
*/
|
||||
ol.render.canvas.Immediate.prototype.drawLineStringGeometry =
|
||||
@@ -598,9 +600,9 @@ ol.render.canvas.Immediate.prototype.drawLineStringGeometry =
|
||||
* Render a MultiLineString geometry into the canvas. Rendering is immediate
|
||||
* and uses the current style.
|
||||
*
|
||||
* @param {ol.geom.MultiLineString} multiLineStringGeometry
|
||||
* @param {ol.geom.MultiLineString|ol.render.Feature} multiLineStringGeometry
|
||||
* MultiLineString geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @api
|
||||
*/
|
||||
ol.render.canvas.Immediate.prototype.drawMultiLineStringGeometry =
|
||||
@@ -635,8 +637,9 @@ ol.render.canvas.Immediate.prototype.drawMultiLineStringGeometry =
|
||||
* Render a Polygon geometry into the canvas. Rendering is immediate and uses
|
||||
* the current style.
|
||||
*
|
||||
* @param {ol.geom.Polygon} polygonGeometry Polygon geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.Polygon|ol.render.Feature} polygonGeometry Polygon
|
||||
* geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @api
|
||||
*/
|
||||
ol.render.canvas.Immediate.prototype.drawPolygonGeometry =
|
||||
@@ -1002,8 +1005,8 @@ ol.render.canvas.Immediate.prototype.setTextStyle = function(textStyle) {
|
||||
* @const
|
||||
* @private
|
||||
* @type {Object.<ol.geom.GeometryType,
|
||||
* function(this: ol.render.canvas.Immediate, ol.geom.Geometry,
|
||||
* Object)>}
|
||||
* function(this: ol.render.canvas.Immediate,
|
||||
* (ol.geom.Geometry|ol.render.Feature), Object)>}
|
||||
*/
|
||||
ol.render.canvas.Immediate.GEOMETRY_RENDERERS_ = {
|
||||
'Point': ol.render.canvas.Immediate.prototype.drawPointGeometry,
|
||||
|
||||
@@ -202,8 +202,8 @@ ol.render.canvas.Replay.prototype.appendFlatCoordinates =
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
ol.render.canvas.Replay.prototype.beginGeometry = function(geometry, feature) {
|
||||
this.beginGeometryInstruction1_ =
|
||||
@@ -224,7 +224,8 @@ ol.render.canvas.Replay.prototype.beginGeometry = function(geometry, feature) {
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {Array.<*>} instructions Instructions array.
|
||||
* @param {function(ol.Feature): T|undefined} featureCallback Feature callback.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T|undefined}
|
||||
* featureCallback Feature callback.
|
||||
* @param {ol.Extent=} opt_hitExtent Only check features that intersect this
|
||||
* extent.
|
||||
* @return {T|undefined} Callback result.
|
||||
@@ -256,7 +257,7 @@ ol.render.canvas.Replay.prototype.replay_ = function(
|
||||
var feature, fill, stroke, text, x, y;
|
||||
switch (type) {
|
||||
case ol.render.canvas.Instruction.BEGIN_GEOMETRY:
|
||||
feature = /** @type {ol.Feature} */ (instruction[1]);
|
||||
feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);
|
||||
var featureUid = goog.getUid(feature).toString();
|
||||
if (skippedFeaturesHash[featureUid] !== undefined ||
|
||||
!feature.getGeometry()) {
|
||||
@@ -409,7 +410,7 @@ ol.render.canvas.Replay.prototype.replay_ = function(
|
||||
break;
|
||||
case ol.render.canvas.Instruction.END_GEOMETRY:
|
||||
if (featureCallback !== undefined) {
|
||||
feature = /** @type {ol.Feature} */ (instruction[1]);
|
||||
feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);
|
||||
var result = featureCallback(feature);
|
||||
if (result) {
|
||||
return result;
|
||||
@@ -517,7 +518,8 @@ ol.render.canvas.Replay.prototype.replay = function(
|
||||
* @param {number} viewRotation View rotation.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function(ol.Feature): T=} opt_featureCallback Feature callback.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T=} opt_featureCallback
|
||||
* Feature callback.
|
||||
* @param {ol.Extent=} opt_hitExtent Only check features that intersect this
|
||||
* extent.
|
||||
* @return {T|undefined} Callback result.
|
||||
@@ -564,8 +566,8 @@ ol.render.canvas.Replay.prototype.reverseHitDetectionInstructions_ =
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
ol.render.canvas.Replay.prototype.endGeometry = function(geometry, feature) {
|
||||
goog.asserts.assert(this.beginGeometryInstruction1_,
|
||||
@@ -1889,7 +1891,8 @@ ol.render.canvas.ReplayGroup.prototype.finish = function() {
|
||||
* @param {number} rotation Rotation.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function(ol.Feature): T} callback Feature callback.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T} callback Feature
|
||||
* callback.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
@@ -1917,7 +1920,7 @@ ol.render.canvas.ReplayGroup.prototype.forEachFeatureAtCoordinate = function(
|
||||
return this.replayHitDetection_(context, transform, rotation,
|
||||
skippedFeaturesHash,
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
@@ -2027,7 +2030,8 @@ ol.render.canvas.ReplayGroup.prototype.replay = function(
|
||||
* @param {number} viewRotation View rotation.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function(ol.Feature): T} featureCallback Feature callback.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T} featureCallback
|
||||
* Feature callback.
|
||||
* @param {ol.Extent=} opt_hitExtent Only check features that intersect this
|
||||
* extent.
|
||||
* @return {T|undefined} Callback result.
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
goog.provide('ol.render.Feature');
|
||||
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.functions');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.geom.GeometryType');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Lightweight, read-only, {@link ol.Feature} and {@link ol.geom.Geometry} like
|
||||
* structure, optimized for rendering and styling. Geometry acces through the
|
||||
* API is limited to getting the type and extent of the geometry.
|
||||
*
|
||||
* @constructor
|
||||
* @param {ol.geom.GeometryType} type Geometry type.
|
||||
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
||||
* @param {Array.<number>|Array.<Array.<number>>} ends Ends or Endss.
|
||||
* @param {Object.<string, *>} properties Properties.
|
||||
*/
|
||||
ol.render.Feature = function(type, flatCoordinates, ends, properties) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Extent|undefined}
|
||||
*/
|
||||
this.extent_;
|
||||
|
||||
goog.asserts.assert(type === ol.geom.GeometryType.POINT ||
|
||||
type === ol.geom.GeometryType.MULTI_POINT ||
|
||||
type === ol.geom.GeometryType.LINE_STRING ||
|
||||
type === ol.geom.GeometryType.MULTI_LINE_STRING ||
|
||||
type === ol.geom.GeometryType.POLYGON,
|
||||
'Need a Point, MultiPoint, LineString, MultiLineString or Polygon type');
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.geom.GeometryType}
|
||||
*/
|
||||
this.type_ = type;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>}
|
||||
*/
|
||||
this.flatCoordinates_ = flatCoordinates;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>|Array.<Array.<number>>}
|
||||
*/
|
||||
this.ends_ = ends;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object.<string, *>}
|
||||
*/
|
||||
this.properties_ = properties;
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get a feature property by its key.
|
||||
* @param {string} key Key
|
||||
* @return {*} Value for the requested key.
|
||||
* @api
|
||||
*/
|
||||
ol.render.Feature.prototype.get = function(key) {
|
||||
return this.properties_[key];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {Array.<number>|Array.<Array.<number>>} Ends or endss.
|
||||
*/
|
||||
ol.render.Feature.prototype.getEnds = function() {
|
||||
return this.ends_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the extent of this feature's geometry.
|
||||
* @return {ol.Extent} Extent.
|
||||
* @api
|
||||
*/
|
||||
ol.render.Feature.prototype.getExtent = function() {
|
||||
if (!goog.isDef(this.extent_)) {
|
||||
this.extent_ = this.type_ === ol.geom.GeometryType.POINT ?
|
||||
ol.extent.createOrUpdateFromCoordinate(this.flatCoordinates_) :
|
||||
ol.extent.createOrUpdateFromFlatCoordinates(
|
||||
this.flatCoordinates_, 0, this.flatCoordinates_.length, 2);
|
||||
|
||||
}
|
||||
return this.extent_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
ol.render.Feature.prototype.getFlatCoordinates =
|
||||
ol.render.Feature.prototype.getOrientedFlatCoordinates = function() {
|
||||
return this.flatCoordinates_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the feature for working with its geometry.
|
||||
* @return {ol.render.Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
ol.render.Feature.prototype.getGeometry = function() {
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the feature properties.
|
||||
* @return {Object.<string, *>} Feature properties.
|
||||
* @api
|
||||
*/
|
||||
ol.render.Feature.prototype.getProperties = function() {
|
||||
return this.properties_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the feature for working with its geometry.
|
||||
* @return {ol.render.Feature} Feature.
|
||||
*/
|
||||
ol.render.Feature.prototype.getSimplifiedGeometry =
|
||||
ol.render.Feature.prototype.getGeometry;
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} Stride.
|
||||
*/
|
||||
ol.render.Feature.prototype.getStride = goog.functions.constant(2);
|
||||
|
||||
|
||||
/**
|
||||
* @return {undefined}
|
||||
*/
|
||||
ol.render.Feature.prototype.getStyleFunction = goog.nullFunction;
|
||||
|
||||
|
||||
/**
|
||||
* Get the type of this feature's geometry.
|
||||
* @return {ol.geom.GeometryType} Geometry type.
|
||||
* @api
|
||||
*/
|
||||
ol.render.Feature.prototype.getType = function() {
|
||||
return this.type_;
|
||||
};
|
||||
+32
-20
@@ -2,6 +2,7 @@ goog.provide('ol.renderer.vector');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('ol.geom.Circle');
|
||||
goog.require('ol.geom.Geometry');
|
||||
goog.require('ol.geom.GeometryCollection');
|
||||
goog.require('ol.geom.LineString');
|
||||
goog.require('ol.geom.MultiLineString');
|
||||
@@ -9,14 +10,15 @@ goog.require('ol.geom.MultiPoint');
|
||||
goog.require('ol.geom.MultiPolygon');
|
||||
goog.require('ol.geom.Point');
|
||||
goog.require('ol.geom.Polygon');
|
||||
goog.require('ol.render.Feature');
|
||||
goog.require('ol.render.IReplayGroup');
|
||||
goog.require('ol.style.ImageState');
|
||||
goog.require('ol.style.Style');
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature1 Feature 1.
|
||||
* @param {ol.Feature} feature2 Feature 2.
|
||||
* @param {ol.Feature|ol.render.Feature} feature1 Feature 1.
|
||||
* @param {ol.Feature|ol.render.Feature} feature2 Feature 2.
|
||||
* @return {number} Order.
|
||||
*/
|
||||
ol.renderer.vector.defaultOrder = function(feature1, feature2) {
|
||||
@@ -76,7 +78,7 @@ ol.renderer.vector.renderCircleGeometry_ =
|
||||
|
||||
/**
|
||||
* @param {ol.render.IReplayGroup} replayGroup Replay group.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @param {function(this: T, goog.events.Event)} listener Listener function.
|
||||
@@ -113,7 +115,7 @@ ol.renderer.vector.renderFeature = function(
|
||||
|
||||
/**
|
||||
* @param {ol.render.IReplayGroup} replayGroup Replay group.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @private
|
||||
@@ -160,13 +162,15 @@ ol.renderer.vector.renderGeometryCollectionGeometry_ =
|
||||
* @param {ol.render.IReplayGroup} replayGroup Replay group.
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @private
|
||||
*/
|
||||
ol.renderer.vector.renderLineStringGeometry_ =
|
||||
function(replayGroup, geometry, style, feature) {
|
||||
goog.asserts.assertInstanceof(geometry, ol.geom.LineString,
|
||||
'geometry should be an ol.geom.LineString');
|
||||
if (geometry instanceof ol.geom.Geometry) {
|
||||
goog.asserts.assertInstanceof(geometry, ol.geom.LineString,
|
||||
'geometry should be an ol.geom.LineString');
|
||||
}
|
||||
var strokeStyle = style.getStroke();
|
||||
if (strokeStyle) {
|
||||
var lineStringReplay = replayGroup.getReplay(
|
||||
@@ -188,13 +192,15 @@ ol.renderer.vector.renderLineStringGeometry_ =
|
||||
* @param {ol.render.IReplayGroup} replayGroup Replay group.
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @private
|
||||
*/
|
||||
ol.renderer.vector.renderMultiLineStringGeometry_ =
|
||||
function(replayGroup, geometry, style, feature) {
|
||||
goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString,
|
||||
'geometry should be an ol.geom.MultiLineString');
|
||||
if (geometry instanceof ol.geom.Geometry) {
|
||||
goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString,
|
||||
'geometry should be an ol.geom.MultiLineString');
|
||||
}
|
||||
var strokeStyle = style.getStroke();
|
||||
if (strokeStyle) {
|
||||
var lineStringReplay = replayGroup.getReplay(
|
||||
@@ -249,13 +255,15 @@ ol.renderer.vector.renderMultiPolygonGeometry_ =
|
||||
* @param {ol.render.IReplayGroup} replayGroup Replay group.
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @private
|
||||
*/
|
||||
ol.renderer.vector.renderPointGeometry_ =
|
||||
function(replayGroup, geometry, style, feature) {
|
||||
goog.asserts.assertInstanceof(geometry, ol.geom.Point,
|
||||
'geometry should be an ol.geom.Point');
|
||||
if (geometry instanceof ol.geom.Geometry) {
|
||||
goog.asserts.assertInstanceof(geometry, ol.geom.Point,
|
||||
'geometry should be an ol.geom.Point');
|
||||
}
|
||||
var imageStyle = style.getImage();
|
||||
if (imageStyle) {
|
||||
if (imageStyle.getImageState() != ol.style.ImageState.LOADED) {
|
||||
@@ -281,13 +289,15 @@ ol.renderer.vector.renderPointGeometry_ =
|
||||
* @param {ol.render.IReplayGroup} replayGroup Replay group.
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @private
|
||||
*/
|
||||
ol.renderer.vector.renderMultiPointGeometry_ =
|
||||
function(replayGroup, geometry, style, feature) {
|
||||
goog.asserts.assertInstanceof(geometry, ol.geom.MultiPoint,
|
||||
'geometry should be an ol.goem.MultiPoint');
|
||||
if (geometry instanceof ol.geom.Geometry) {
|
||||
goog.asserts.assertInstanceof(geometry, ol.geom.MultiPoint,
|
||||
'geometry should be an ol.goem.MultiPoint');
|
||||
}
|
||||
var imageStyle = style.getImage();
|
||||
if (imageStyle) {
|
||||
if (imageStyle.getImageState() != ol.style.ImageState.LOADED) {
|
||||
@@ -312,15 +322,17 @@ ol.renderer.vector.renderMultiPointGeometry_ =
|
||||
|
||||
/**
|
||||
* @param {ol.render.IReplayGroup} replayGroup Replay group.
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @private
|
||||
*/
|
||||
ol.renderer.vector.renderPolygonGeometry_ =
|
||||
function(replayGroup, geometry, style, feature) {
|
||||
goog.asserts.assertInstanceof(geometry, ol.geom.Polygon,
|
||||
'geometry should be an ol.geom.Polygon');
|
||||
if (geometry instanceof ol.geom.Geometry) {
|
||||
goog.asserts.assertInstanceof(geometry, ol.geom.Polygon,
|
||||
'geometry should be an ol.geom.Polygon or ol.render.Feature');
|
||||
}
|
||||
var fillStyle = style.getFill();
|
||||
var strokeStyle = style.getStroke();
|
||||
if (fillStyle || strokeStyle) {
|
||||
|
||||
@@ -44,25 +44,27 @@ ol.render.VectorContext.prototype.drawGeometryCollectionGeometry =
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.LineString} lineStringGeometry Line string geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.LineString|ol.render.Feature} lineStringGeometry Line
|
||||
* string geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
ol.render.VectorContext.prototype.drawLineStringGeometry =
|
||||
goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.MultiLineString} multiLineStringGeometry
|
||||
* @param {ol.geom.MultiLineString|ol.render.Feature} multiLineStringGeometry
|
||||
* MultiLineString geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
ol.render.VectorContext.prototype.drawMultiLineStringGeometry =
|
||||
goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.MultiPoint} multiPointGeometry MultiPoint geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.MultiPoint|ol.render.Feature} multiPointGeometry MultiPoint
|
||||
* geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
ol.render.VectorContext.prototype.drawMultiPointGeometry = goog.abstractMethod;
|
||||
|
||||
@@ -76,15 +78,16 @@ ol.render.VectorContext.prototype.drawMultiPolygonGeometry =
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.Point} pointGeometry Point geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.Point|ol.render.Feature} pointGeometry Point geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
ol.render.VectorContext.prototype.drawPointGeometry = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.geom.Polygon} polygonGeometry Polygon geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.Polygon|ol.render.Feature} polygonGeometry Polygon
|
||||
* geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
ol.render.VectorContext.prototype.drawPolygonGeometry = goog.abstractMethod;
|
||||
|
||||
@@ -94,8 +97,8 @@ ol.render.VectorContext.prototype.drawPolygonGeometry = goog.abstractMethod;
|
||||
* @param {number} offset Offset.
|
||||
* @param {number} end End.
|
||||
* @param {number} stride Stride.
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
ol.render.VectorContext.prototype.drawText = goog.abstractMethod;
|
||||
|
||||
|
||||
@@ -294,8 +294,8 @@ ol.render.webgl.Immediate.prototype.setTextStyle = function(textStyle) {
|
||||
* @const
|
||||
* @private
|
||||
* @type {Object.<ol.geom.GeometryType,
|
||||
* function(this: ol.render.webgl.Immediate, ol.geom.Geometry,
|
||||
* Object)>}
|
||||
* function(this: ol.render.webgl.Immediate,
|
||||
* (ol.geom.Geometry|ol.render.Feature), Object)>}
|
||||
*/
|
||||
ol.render.webgl.Immediate.GEOMETRY_RENDERERS_ = {
|
||||
'Point': ol.render.webgl.Immediate.prototype.drawPointGeometry,
|
||||
|
||||
Reference in New Issue
Block a user