Re-add the ol.render.Feature#getGeometry() method

This method does have value for users that want to switch between ol.Feature
and ol.render.Feature and still be able to use #getGeometry().getType() in a
style function to determine the feature geometry's type.
This commit is contained in:
Andreas Hocevar
2017-05-16 08:37:30 +02:00
parent 4664a19718
commit 142f16afe4
2 changed files with 1 additions and 4 deletions

View File

@@ -2,10 +2,6 @@
### Next release
#### Removal of `ol.render.Feature#getGeometry()`
The `ol.render.Feature#getGeometry()` function simply returns the feature itself. Users who relied on this function can use the `ol.render.Feature` instance directly instead.
### v4.1.0
#### Adding duplicate layers to a map throws

View File

@@ -121,6 +121,7 @@ ol.render.Feature.prototype.getFlatCoordinates =
/**
* Get the feature for working with its geometry.
* @return {ol.render.Feature} Feature.
* @api
*/
ol.render.Feature.prototype.getGeometry = function() {
return this;