Appearance
extrudeMap
ExtrudeMap
Kind: global class
Version: 1.0.0
new ExtrudeMap(options)
生成拉伸体
Returns: Entity
- 根据 geojson features 生成拉伸地图
Param | Type | Description |
---|---|---|
options | object | 传入参数 |
opts.features | Array | geojson 点集 |
opts.featureColors | Array | 一对一的颜色对象 |
opts.mainMapExtrude | number | 拉伸高 |
opts.mapUrl | string | 贴图图片 |
opts.normalMap | number | 法线贴图图片 |
opts.size | number | 大小 |
opts.mainSideOpacity | number | 侧边透明度 |
opts.mainSideColor | string | 侧边颜色 |
opts.SelectedHeight | number | 选中后上升高度 |
opts.selectedColor | string | 选中颜色 |
opts.borderColor | string | 边线颜色 |
opts.borderWidth | number | 边线宽度 |
opts.hoverColor | string | 鼠标悬浮颜色,为 false 时无悬浮颜色 |
opts.isBorder | boolean | 是否需要边线 |
opts.onBorderCreated | Function | 当一个区域被创建,回调参数为区域 group |
opts.onselected | Function | 当一个区域被选中,回调参数为区域 group |
Example
js
ExtrudeMap({
features,
mainMapExtrude: 500,
mapUrl: 'http://localhost/ftthree/images/china1.png',
mainSideOpacity: 0.5,
mainSideColor: 0xff0000,
size: 100,
SelectedHeight: 3,
selectedColor: 0xff0000,
featureColors: {
广东省: 0xffff00,
湖南省: 0xff00ff
},
borderColor: 0xffffff,
borderWidth: 5,
hoverColor: 0x00ffff
});