OpenLayers 2 XYZ语法类似于OSM,但您为
attribution
(单数),
numZoomLevels
(比1大
maxZoom
在OpenLayers 3中,缩放级别从0开始,标准球形mercator OSM兼容的图块网格。
this.map.addLayer(new OpenLayers.Layer.XYZ(
"Satellite", [
"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/${z}/${y}/${x}"
], {
attribution: "Powered by Esri. " +
"Source: Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community",
numZoomLevels: 24,
sphericalMercator: true
}))