# MapGISMapServerImageryProvider

#### new Cesium.MapGISMapServerImageryProvider(options, sceneIndex, layerIndex)
MapGIS/Provider/MapGISMapServerImageryProvider.js 48

MapGIS地图文档

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

`options`

Object

包含以下属性

Name | Type | Description
--- | --- | ---
`url` | String | 服务地址 eg:http://localhost:6163/igs/rest/mrms/docs/地图文档名

`sceneIndex` | Number |  | optional 三维地图文档图层所在场景索引，当加载三维地图文档时为必需参数
`layerIndex` | Number |  | optional 三维地图文档图层索引，当加载三维地图文档时为必需参数
`options.enablePickFeatures` | Boolean | `false` | optional 是否启用瓦片要素获取
`options.tileWidth` | Number | `256` | optional 瓦片宽度
`options.tileHeight` | Number | `256` | optional 瓦片高度
`options.minimumLevel` | Number | `0` | optional 瓦片最小级别
`options.maximumLevel` | Number | `0` | optional 瓦片最大级别
`options.colNum` | Number | `2` | optional 瓦片初始级的列数 默认为2
`options.rowNum` | Number | `1` | optional 瓦片初始级的列数 默认为1
`options.gdbps` | Array |  | optional gdbps地址数组
`options.layers` | String |  | optional layers参数，用于过滤图层
`options.tilingScheme` | Object |  | optional 服务的平铺方案:经纬度GeographicTilingScheme,web墨卡托WebMercatorTilingScheme
`options.mapgisOffset` | String |  | optional 瓦片错级参数，默认为0
`options.proxy` | String |  | optional 转发代理
`options.extensions` | Array |  | optional 扩展参数，需要确保服务端支持

##### Example:

    // options.extensions 参数为自定义扩展参数，需要确保服务端支持此类参数生效
           var options = {
                             extensions: [   { key: 'token', value: 'tokentokentokentoken' },
                                             { key: 'filters', value: '1:ID>4,3:ID>1' },
                                             { key: 'proj', value: 'Web墨卡托_WGS1984' }
                                         ]
                         };
           //二维地图文档加载
           var mapGIS2DLayer = viewer.scene.layers.appendImageryLayer('http://localhost:6163/igs/rest/mrms/docs/二维矢量',otherOptions);
           //三维地图文档加载
           var mapGIS3DLayer = viewer.scene.layers.appendImageryLayer('http://54.222.218.173:6163/igs/rest/g3d/lcmap/',0,0,otherOptions);

### Methods

#### getTileCredits(x, y, level) → Object
MapGIS/Provider/MapGISMapServerImageryProvider.js 432

Name | Type | Description
--- | --- | ---
`x` | Number |
`y` | Number |
`level` | Number |

##### Returns:

凭证对象(暂时不需要)

#### pickFeatures(imageryProvider, x, y, level, longitude, latitude) → Object
MapGIS/Provider/MapGISMapServerImageryProvider.js 480

获取瓦片内要素

Name | Type | Description
--- | --- | ---
`imageryProvider` | Object |
`x` | Number |
`y` | Number |
`level` | Number |
`longitude` | Number |
`latitude` | Number |

##### Returns:

瓦片内要素的JSON对象

#### requestImage(imageryProvider, x, y, level, request) → Object
MapGIS/Provider/MapGISMapServerImageryProvider.js 455

请求瓦片

Name | Type | Description
--- | --- | ---
`imageryProvider` | Object |
`x` | Number |
`y` | Number |
`level` | Number |
`request` | Object |

##### Returns:

瓦片的Resource对象