Rename _ol_source_XYZ_ to XYZ

This commit is contained in:
Tim Schaub
2018-01-08 13:56:25 -07:00
parent fe0d05900f
commit 8c0a06b56a
26 changed files with 79 additions and 79 deletions

View File

@@ -1,7 +1,7 @@
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import TileLayer from '../src/ol/layer/Tile.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
var appId = 'kDm0Jq1K4Ak7Bwtn8uvk';
var appCode = 'xnmvc4dKZrDfGlvQHXSvwQ';
@@ -59,7 +59,7 @@ for (i = 0, ii = hereLayers.length; i < ii; ++i) {
layers.push(new TileLayer({
visible: false,
preload: Infinity,
source: new _ol_source_XYZ_({
source: new XYZ({
url: createUrl(urlTpl, layerDesc),
attributions: 'Map Tiles &copy; ' + new Date().getFullYear() + ' ' +
'<a href="http://developer.here.com">HERE</a>'

View File

@@ -9,7 +9,7 @@ import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import TileImage from '../src/ol/source/TileImage.js';
import _ol_source_TileWMS_ from '../src/ol/source/TileWMS.js';
import _ol_source_WMTS_ from '../src/ol/source/WMTS.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
import TileGrid from '../src/ol/tilegrid/TileGrid.js';
import proj4 from 'proj4';
@@ -59,7 +59,7 @@ proj54009.setExtent([-18e6, -9e6, 18e6, 9e6]);
var layers = {};
layers['bng'] = new TileLayer({
source: new _ol_source_XYZ_({
source: new XYZ({
projection: 'EPSG:27700',
url: 'https://tileserver.maptiler.com/miniscale/{z}/{x}/{y}.png',
crossOrigin: '',
@@ -117,7 +117,7 @@ fetch(url).then(function(response) {
});
layers['grandcanyon'] = new TileLayer({
source: new _ol_source_XYZ_({
source: new XYZ({
url: 'https://tileserver.maptiler.com/grandcanyon@2x/{z}/{x}/{y}.png',
crossOrigin: '',
tilePixelRatio: 2,

View File

@@ -1,7 +1,7 @@
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import TileLayer from '../src/ol/layer/Tile.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
var urls = [
'https://{a-c}.tiles.mapbox.com/v3/mapbox.blue-marble-topo-jan/{z}/{x}/{y}.png',
@@ -10,7 +10,7 @@ var urls = [
'https://{a-c}.tiles.mapbox.com/v3/mapbox.blue-marble-topo-bathy-jul/{z}/{x}/{y}.png'
];
var source = new _ol_source_XYZ_();
var source = new XYZ();
var map = new Map({
target: 'map',

View File

@@ -5,7 +5,7 @@ import ImageLayer from '../src/ol/layer/Image.js';
import TileLayer from '../src/ol/layer/Tile.js';
import {fromLonLat} from '../src/ol/proj.js';
import RasterSource from '../src/ol/source/Raster.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
function flood(pixels, data) {
var pixel = pixels[0];
@@ -24,7 +24,7 @@ function flood(pixels, data) {
}
var key = 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg';
var elevation = new _ol_source_XYZ_({
var elevation = new XYZ({
url: 'https://api.mapbox.com/v4/mapbox.terrain-rgb/{z}/{x}/{y}.pngraw?access_token=' + key,
crossOrigin: 'anonymous',
transition: 0
@@ -39,7 +39,7 @@ var map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new _ol_source_XYZ_({
source: new XYZ({
url: 'https://api.mapbox.com/styles/v1/tschaub/ciutc102t00c62js5fqd47kqw/tiles/256/{z}/{x}/{y}?access_token=' + key
})
}),

View File

@@ -5,7 +5,7 @@ import ImageLayer from '../src/ol/layer/Image.js';
import TileLayer from '../src/ol/layer/Tile.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import RasterSource from '../src/ol/source/Raster.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
/**
@@ -102,7 +102,7 @@ function shade(inputs, data) {
return {data: shadeData, width: width, height: height};
}
var elevation = new _ol_source_XYZ_({
var elevation = new XYZ({
url: 'https://{a-d}.tiles.mapbox.com/v3/aj.sf-dem/{z}/{x}/{y}.png',
crossOrigin: 'anonymous',
transition: 0

View File

@@ -1,16 +1,16 @@
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import TileLayer from '../src/ol/layer/Tile.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
var url = 'https://{a-c}.tiles.mapbox.com/v3/mapbox.world-bright/{z}/{x}/{y}.png';
var withTransition = new TileLayer({
source: new _ol_source_XYZ_({url: url})
source: new XYZ({url: url})
});
var withoutTransition = new TileLayer({
source: new _ol_source_XYZ_({url: url, transition: 0}),
source: new XYZ({url: url, transition: 0}),
visible: false
});

View File

@@ -10,7 +10,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
import {fromLonLat} from '../src/ol/proj.js';
import VectorSource from '../src/ol/source/Vector.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
import _ol_tilegrid_ from '../src/ol/tilegrid.js';
@@ -54,7 +54,7 @@ var vector = new VectorLayer({
});
var raster = new TileLayer({
source: new _ol_source_XYZ_({
source: new XYZ({
attributions: 'Tiles © <a href="https://services.arcgisonline.com/ArcGIS/' +
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>',
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' +

View File

@@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
import {fromLonLat} from '../src/ol/proj.js';
import VectorSource from '../src/ol/source/Vector.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
import _ol_style_Style_ from '../src/ol/style/Style.js';
@@ -96,7 +96,7 @@ var vector = new VectorLayer({
});
var raster = new TileLayer({
source: new _ol_source_XYZ_({
source: new XYZ({
attributions: 'Tiles © <a href="https://services.arcgisonline.com/ArcGIS/' +
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>',
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' +

View File

@@ -1,7 +1,7 @@
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import TileLayer from '../src/ol/layer/Tile.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
// The tile size supported by the ArcGIS tile service.
var tileSize = 512;
@@ -13,7 +13,7 @@ var map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new _ol_source_XYZ_({
source: new XYZ({
attributions: 'Copyright:© 2013 ESRI, i-cubed, GeoEye',
maxZoom: 16,
projection: 'EPSG:4326',

View File

@@ -2,14 +2,14 @@ import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import TileLayer from '../src/ol/layer/Tile.js';
import {fromLonLat} from '../src/ol/proj.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
var map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new _ol_source_XYZ_({
source: new XYZ({
attributions: 'Tiles © <a href="https://services.arcgisonline.com/ArcGIS/' +
'rest/services/World_Topo_Map/MapServer">ArcGIS</a>',
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/' +

View File

@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
import TileLayer from '../src/ol/layer/Tile.js';
import {transform, transformExtent} from '../src/ol/proj.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
var mapMinZoom = 1;
var mapMaxZoom = 15;
@@ -17,7 +17,7 @@ var map = new Map({
}),
new TileLayer({
extent: transformExtent(mapExtent, 'EPSG:4326', 'EPSG:3857'),
source: new _ol_source_XYZ_({
source: new XYZ({
attributions: 'Tiles © USGS, rendered with ' +
'<a href="http://www.maptiler.com/">MapTiler</a>',
url: 'https://tileserver.maptiler.com/grandcanyon@2x/{z}/{x}/{y}.png',

View File

@@ -1,14 +1,14 @@
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import TileLayer from '../src/ol/layer/Tile.js';
import _ol_source_XYZ_ from '../src/ol/source/XYZ.js';
import XYZ from '../src/ol/source/XYZ.js';
var map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new _ol_source_XYZ_({
source: new XYZ({
url: 'https://{a-c}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png' +
'?apikey=0e6fc415256d4fbb9b5166a718591d71'
})