createTileMapServiceImageryProvider.js 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import deprecationWarning from '../Core/deprecationWarning.js';
  2. import TileMapServiceImageryProvider from './TileMapServiceImageryProvider.js';
  3. /**
  4. * Creates a {@link UrlTemplateImageryProvider} instance that provides tiled imagery as generated by
  5. * {@link http://www.maptiler.org/'>MapTiler</a> / <a href='http://www.klokan.cz/projects/gdal2tiles/|GDDAL2Tiles} etc.
  6. *
  7. * @exports createTileMapServiceImageryProvider
  8. *
  9. * @param {Object} [options] Object with the following properties:
  10. * @param {Resource|String} [options.url='.'] Path to image tiles on server.
  11. * @param {String} [options.fileExtension='png'] The file extension for images on the server.
  12. * @param {Credit|String} [options.credit=''] A credit for the data source, which is displayed on the canvas.
  13. * @param {Number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
  14. * this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
  15. * to result in rendering problems.
  16. * @param {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
  17. * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
  18. * @param {TilingScheme} [options.tilingScheme] The tiling scheme specifying how the ellipsoidal
  19. * surface is broken into tiles. If this parameter is not provided, a {@link WebMercatorTilingScheme}
  20. * is used.
  21. * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
  22. * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
  23. * parameter is specified, the WGS84 ellipsoid is used.
  24. * @param {Number} [options.tileWidth=256] Pixel width of image tiles.
  25. * @param {Number} [options.tileHeight=256] Pixel height of image tiles.
  26. * @param {Boolean} [options.flipXY] Older versions of gdal2tiles.py flipped X and Y values in tilemapresource.xml.
  27. * Specifying this option will do the same, allowing for loading of these incorrect tilesets.
  28. * @returns {UrlTemplateImageryProvider} The imagery provider.
  29. *
  30. * @deprecated
  31. *
  32. * @see ArcGisMapServerImageryProvider
  33. * @see BingMapsImageryProvider
  34. * @see GoogleEarthEnterpriseMapsProvider
  35. * @see OpenStreetMapImageryProvider
  36. * @see SingleTileImageryProvider
  37. * @see WebMapServiceImageryProvider
  38. * @see WebMapTileServiceImageryProvider
  39. * @see UrlTemplateImageryProvider
  40. *
  41. * @example
  42. * var tms = new Cesium.TileMapServiceImageryProvider({
  43. * url : '../images/cesium_maptiler/Cesium_Logo_Color',
  44. * fileExtension: 'png',
  45. * maximumLevel: 4,
  46. * rectangle: new Cesium.Rectangle(
  47. * Cesium.Math.toRadians(-120.0),
  48. * Cesium.Math.toRadians(20.0),
  49. * Cesium.Math.toRadians(-60.0),
  50. * Cesium.Math.toRadians(40.0))
  51. * });
  52. */
  53. function createTileMapServiceImageryProvider(options) {
  54. deprecationWarning('createTileMapServiceImageryProvider', 'createTileMapServiceImageryProvider is deprecated and will be removed in Cesium 1.65. Please use TileMapServiceImageryProvider instead.');
  55. return new TileMapServiceImageryProvider(options);
  56. }
  57. export default createTileMapServiceImageryProvider;