-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] GoeImage layer with getExtent #330
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* Copyright (c) 2019 Jean-Marc VIGLINO, | ||
released under the CeCILL-B license (French BSD license) | ||
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt). | ||
*/ | ||
import ol_layer_Image from 'ol/layer/Image' | ||
import {ol_ext_inherits} from '../util/ext' | ||
|
||
/** | ||
* @classdesc | ||
* Image layer to use with a GeoImage source and return the extent calcaulted with this source. | ||
* @extends {ol.layer.Image} | ||
* @param {Object=} options Layer Image options. | ||
* @api | ||
*/ | ||
var ol_layer_GeoImage = function(options) { | ||
ol_layer_Image.call(this, options); | ||
} | ||
ol_ext_inherits (ol_layer_GeoImage, ol_layer_Image); | ||
|
||
/** | ||
* Return the {@link module:ol/extent~Extent extent} of the source associated with the layer. | ||
* @return {ol.Extent} The layer extent. | ||
* @observable | ||
* @api | ||
*/ | ||
ol_layer_GeoImage.prototype.getExtent = function() { | ||
return this.getSource().getExtent(); | ||
} | ||
|
||
export default ol_layer_GeoImage; |