Rename _ol_source_ImageCanvasSource_ to ImageCanvasSource
This commit is contained in:
4
examples/d3.js
vendored
4
examples/d3.js
vendored
@@ -5,7 +5,7 @@ import {getWidth, getCenter} from '../src/ol/extent.js';
|
||||
import ImageLayer from '../src/ol/layer/Image.js';
|
||||
import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import {fromLonLat, toLonLat} from '../src/ol/proj.js';
|
||||
import _ol_source_ImageCanvas_ from '../src/ol/source/ImageCanvas.js';
|
||||
import ImageCanvasSource from '../src/ol/source/ImageCanvas.js';
|
||||
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ d3.json('data/topojson/us.json', function(error, us) {
|
||||
};
|
||||
|
||||
var layer = new ImageLayer({
|
||||
source: new _ol_source_ImageCanvas_({
|
||||
source: new ImageCanvasSource({
|
||||
canvasFunction: canvasFunction,
|
||||
projection: 'EPSG:3857'
|
||||
})
|
||||
|
||||
@@ -15,7 +15,7 @@ import ImageSource from '../source/Image.js';
|
||||
* @param {olx.source.ImageCanvasOptions} options Constructor options.
|
||||
* @api
|
||||
*/
|
||||
var _ol_source_ImageCanvas_ = function(options) {
|
||||
var ImageCanvasSource = function(options) {
|
||||
|
||||
ImageSource.call(this, {
|
||||
attributions: options.attributions,
|
||||
@@ -51,13 +51,13 @@ var _ol_source_ImageCanvas_ = function(options) {
|
||||
|
||||
};
|
||||
|
||||
inherits(_ol_source_ImageCanvas_, ImageSource);
|
||||
inherits(ImageCanvasSource, ImageSource);
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_source_ImageCanvas_.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
|
||||
ImageCanvasSource.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
|
||||
resolution = this.findNearestResolution(resolution);
|
||||
|
||||
var canvas = this.canvas_;
|
||||
@@ -85,4 +85,4 @@ _ol_source_ImageCanvas_.prototype.getImageInternal = function(extent, resolution
|
||||
|
||||
return canvas;
|
||||
};
|
||||
export default _ol_source_ImageCanvas_;
|
||||
export default ImageCanvasSource;
|
||||
|
||||
Reference in New Issue
Block a user