Skip to content

Commit

Permalink
[ADD] GoeImage layer with getExtent #330
Browse files Browse the repository at this point in the history
  • Loading branch information
Viglino committed Aug 11, 2019
1 parent 686e98d commit c88bc43
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/layer/GeoImage.js
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;

0 comments on commit c88bc43

Please sign in to comment.