Skip to content
On this page

extrudeMap

ExtrudeMap

Kind: global class
Version: 1.0.0

new ExtrudeMap(options)

生成拉伸体

Returns: Entity - 根据 geojson features 生成拉伸地图

ParamTypeDescription
optionsobject传入参数
opts.featuresArraygeojson 点集
opts.featureColorsArray一对一的颜色对象
opts.mainMapExtrudenumber拉伸高
opts.mapUrlstring贴图图片
opts.normalMapnumber法线贴图图片
opts.sizenumber大小
opts.mainSideOpacitynumber侧边透明度
opts.mainSideColorstring侧边颜色
opts.SelectedHeightnumber选中后上升高度
opts.selectedColorstring选中颜色
opts.borderColorstring边线颜色
opts.borderWidthnumber边线宽度
opts.hoverColorstring鼠标悬浮颜色,为 false 时无悬浮颜色
opts.isBorderboolean是否需要边线
opts.onBorderCreatedFunction当一个区域被创建,回调参数为区域 group
opts.onselectedFunction当一个区域被选中,回调参数为区域 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
});