一、设置3D效果1、初始化地图时打开3D视图,设置视角和设置光照(AmbientLight环境光源,DirectionLight平行光源),添加3D图层(Object3DLayer),创建Object3D实例,并将Object3D实例添加到object3dLayer。,绘制省市边界functionDrawSection(cityName,district,isSearchNextLevel){district.search(cityName,function(status,result){console.log('result===',result)letbounds=result.districtList[0].boundaries;if(bounds){for(leti=0;i{letpolyline=nullletstrokeColor=currentData&¤tData.name===item.name?'#F9E446':item.colorif(item&&item.type==='MultiLineString'){item.coordinates.forEach(iitem=>{polyline=newAMap.Polyline({path:iitem,data:item,strokeWeight:8,strokeColor:strokeColor,//线条颜色lineJoin:'round'//折线拐点连接点的样式})})}elseif(item){//[[],[]]polyline=newAMap.Polyline({path:item.coordinates,data:item,strokeWeight:8,strokeColor:strokeColor,lineJoin:'round'//折线拐点交界处的样式})}letmap=this.map//绘制当前线//给地图实例添加折线map.add(polyline)this.polylines.push(polyline)polyline.on('click',this.polylineClick)})},4.点击一条线或一个点的事件year:this.year,zl:data.name}).then(res=>{让detail=res.data[0]让riverItem=getRiverItem()riverItem.forEach(item=>{if(item.name==='jll'||item.name==='ssl'){item.label=item.label+'('+this.year+')'+':'}else{item.label=item.label+':'}})letriverInfo=this.setContentByItem(riverItem,detail)letmyRow=''+detail.zl+'