# MapGISCustomImageryProvider

#### new Cesium.MapGISCustomImageryProvider(options)
MapGIS/Provider/MapGISCustomImageryProvider.js 52

提供自定义裁图的API服务.

Name | Type | Description
--- | --- | ---

`options`

MapGISCustomImageryProvider.ConstructorOptions

初始化构造参数

Name | Type | Default | Description
--- | --- | --- | ---
`epsg` | String | `'EPSG:4490'` | optional 默认采用经纬度投影,目前支持utm lonlat webmercator,传入EPSG:编号
`resolutions` | String |  | optional 瓦片各级分辨率
`origin` | String |  | optional 默认 [-180 90]
`bounds` | String |  | optional 默认 [[-180, -90],[180, 90]]
`dpi` | String | `96` | optional 默认96可选 96 0.28

##### Example:

    var baidu = new Cesium.MapGISCustomImageryProvider({
        url : 'https://earth.localdomain',
    });

##### See:

- Cross-Origin Resource Sharing

### Members

#### static Cesium.MapGISCustomImageryProvider.logoUrl : String
MapGIS/Provider/MapGISCustomImageryProvider.js 500

Gets or sets the URL to the Google Earth logo for display in the credit.

#### readonly credit : Credit
MapGIS/Provider/MapGISCustomImageryProvider.js 415

瓦片数据源的证书. 在`MapGISCustomImageryProvider#ready` 返回true前无法获取.

#### defaultAlpha : Number|undefined
MapGIS/Provider/MapGISCustomImageryProvider.js 67

瓦片数据源默认透明度, 0.0表示透明，1.0表示不透明.

Default Value: `undefined`

#### defaultBrightness : Number|undefined
MapGIS/Provider/MapGISCustomImageryProvider.js 91

瓦片数据源的明亮度. 1.0使用标准颜色.小于1.0变暗，大于1.0变明亮.

Default Value: `undefined`

#### defaultContrast : Number|undefined
MapGIS/Provider/MapGISCustomImageryProvider.js 99

瓦片数据源的颜色反差. 1.0使用标准颜色.小于1.0减少反差值，大于1.0增加反差值.

Default Value: `undefined`

#### defaultDayAlpha : Number|undefined
MapGIS/Provider/MapGISCustomImageryProvider.js 83

瓦片数据源地球白天半球的混合透明度, 0.0表示透明，1.0表示不透明.

Default Value: `undefined`

#### defaultGamma : Number|undefined
MapGIS/Provider/MapGISCustomImageryProvider.js 123

瓦片数据源的灰度系数. 1.0使用标准灰度系数. 默认1.9

Default Value: `1.9`

#### defaultHue : Number|undefined
MapGIS/Provider/MapGISCustomImageryProvider.js 107

瓦片数据源的颜色色调. 0.0使用标准颜色.

Default Value: `undefined`

#### defaultMagnificationFilter : TextureMagnificationFilter
MapGIS/Provider/MapGISCustomImageryProvider.js 139

瓦片数据源的纹理放大值.

Default Value: `undefined`

#### defaultMinificationFilter : TextureMinificationFilter
MapGIS/Provider/MapGISCustomImageryProvider.js 131

瓦片数据源的纹理缩小值.

Default Value: `undefined`

#### defaultNightAlpha : Number|undefined
MapGIS/Provider/MapGISCustomImageryProvider.js 75

瓦片数据源地球夜晚半球的混合透明度, 0.0表示透明，1.0表示不透明.

Default Value: `undefined`

#### defaultSaturation : Number|undefined
MapGIS/Provider/MapGISCustomImageryProvider.js 115

瓦片数据源的颜色饱和度. 1.0使用标准饱和度.小于1.0减少饱和度，大于1.0增加饱和度.

Default Value: `undefined`

#### readonly errorEvent : Event
MapGIS/Provider/MapGISCustomImageryProvider.js 379

瓦片数据源的错误事件，当异步瓦片请求错误的时候发送事件. 通过订阅事件,提前发现潜在的瓦片问题并解决. 事件监听类型为`TileProviderError`.

#### readonly maximumLevel : Number|undefined
MapGIS/Provider/MapGISCustomImageryProvider.js 289

瓦片的最大级别. 在`MapGISCustomImageryProvider#ready` 返回true前无法获取.

#### readonly minimumLevel : Number
MapGIS/Provider/MapGISCustomImageryProvider.js 307

瓦片的最小级别. 在`MapGISCustomImageryProvider#ready` 返回true前无法获取.

#### readonly proxy : Proxy
MapGIS/Provider/MapGISCustomImageryProvider.js 241

数据源代理.

#### readonly ready : Boolean
MapGIS/Provider/MapGISCustomImageryProvider.js 391

瓦片数据源是否准备好开始正式使用.

#### readonly readyPromise : Promise.<Boolean>
MapGIS/Provider/MapGISCustomImageryProvider.js 403

当瓦片数据源准备好后返回一个promise外部使用.

#### readonly rectangle : Rectangle
MapGIS/Provider/MapGISCustomImageryProvider.js 343

瓦片数据源的空间范围.在`MapGISCustomImageryProvider#ready` 返回true前无法获取.

#### readonly tileDiscardPolicy : TileDiscardPolicy
MapGIS/Provider/MapGISCustomImageryProvider.js 361

瓦片数据源的无效瓦片删除策略.在`MapGISCustomImageryProvider#ready` 返回true前无法获取.

#### readonly tileHeight : Number
MapGIS/Provider/MapGISCustomImageryProvider.js 271

瓦片高度，单位像素. 在`MapGISCustomImageryProvider#ready` 返回true前无法获取.

#### readonly tileWidth : Number
MapGIS/Provider/MapGISCustomImageryProvider.js 253

瓦片宽度，单位像素. 在`MapGISCustomImageryProvider#ready` 返回true前无法获取.

#### readonly tilingScheme : TilingScheme
MapGIS/Provider/MapGISCustomImageryProvider.js 325

瓦片数据源的切片规则. 在`MapGISCustomImageryProvider#ready` 返回true前无法获取.

#### readonly url : String
MapGIS/Provider/MapGISCustomImageryProvider.js 229

自定义裁图地图的Url.

### Methods

#### getTileCredits(x, y, level) → Array.<Credit>
MapGIS/Provider/MapGISCustomImageryProvider.js 432

Gets the credits to be displayed when a given tile is displayed.

Name | Type | Description
--- | --- | ---
`x` | Number | The tile X coordinate.
`y` | Number | The tile Y coordinate.
`level` | Number | The tile level;

##### Returns:

The credits to be displayed when the tile is displayed.

##### Throws:

- DeveloperError : `getTileCredits` must not be called before the imagery provider is ready.

#### pickFeatures(x, y, level, longitude, latitude) → Promise.<Array.<ImageryLayerFeatureInfo>>|undefined
MapGIS/Provider/MapGISCustomImageryProvider.js 488

Picking features is not currently supported by this imagery provider, so this function simply returns undefined.

Name | Type | Description
--- | --- | ---
`x` | Number | The tile X coordinate.
`y` | Number | The tile Y coordinate.
`level` | Number | The tile level.
`longitude` | Number | The longitude at which to pick features.
`latitude` | Number | The latitude at which to pick features.

##### Returns:

A promise for the picked features that will resolve when the asynchronous picking completes. The resolved value is an array of `ImageryLayerFeatureInfo` instances. The array may be empty if no features are found at the given location. It may also be undefined if picking is not supported.

#### requestImage(x, y, level, request) → Promise.<(HTMLImageElement|HTMLCanvasElement)>|undefined
MapGIS/Provider/MapGISCustomImageryProvider.js 451

Requests the image for a given tile. This function should not be called before `MapGISCustomImageryProvider#ready` returns true.

Name | Type | Description
--- | --- | ---
`x` | Number | The tile X coordinate.
`y` | Number | The tile Y coordinate.
`level` | Number | The tile level.
`request` | Request | optional The request object. Intended for internal use only.

##### Returns:

A promise for the image that will resolve when the image is available, or undefined if there are too many active requests to the server, and the request should be retried later. The resolved image may be either an Image or a Canvas DOM object.

##### Throws:

- DeveloperError : `requestImage` must not be called before the imagery provider is ready.

### Type Definitions

#### Cesium.MapGISCustomImageryProvider.ConstructorOptions
MapGIS/Provider/MapGISCustomImageryProvider.js 20

MapGIS-自定义裁图

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`url` | Resource | String |  | MapGIS自定义裁图Url
`maximumLevel` | Number | <optional> | 最大显示级别
`tileDiscardPolicy` | TileDiscardPolicy | <optional> | 卡片策略，该策略决定如果是一张无效瓦片就会删除. 如果要确保没有瓦片被删除,传递`NeverTileDiscardPolicy`参数.
`ellipsoid` | Ellipsoid | <optional> | 椭球体. 不指定则使用WGS84椭球

Author:
  - 基础平台-潘卓然