Allow styles to configure a custom renderer
Two new examples show how custom renderers can be used to render text along paths, and to declutter labels using 3rd party libraries.
This commit is contained in:
@@ -41,6 +41,12 @@ ol.geom.SimpleGeometry = function() {
|
||||
*/
|
||||
this.flatCoordinates = null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<number>|Array.<Array.<number>>|Array.<Array.<Array.<number>>>}
|
||||
*/
|
||||
this.renderCoordinates_ = null;
|
||||
|
||||
};
|
||||
ol.inherits(ol.geom.SimpleGeometry, ol.geom.Geometry);
|
||||
|
||||
@@ -141,6 +147,18 @@ ol.geom.SimpleGeometry.prototype.getLayout = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {Array.<number>|Array.<Array.<number>>|Array.<Array.<Array.<number>>>}
|
||||
* Render coordinates.
|
||||
*/
|
||||
ol.geom.SimpleGeometry.prototype.getRenderCoordinates = function() {
|
||||
if (!this.renderCoordinates_) {
|
||||
this.renderCoordinates_ = [];
|
||||
}
|
||||
return this.renderCoordinates_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user