1
클라이언트 쪽 그래픽과 함께 설명 선을 사용하는 데 어려움을 겪고 있습니다.클라이언트 쪽 그래픽에서 3D 설명 선이 작동하지 않습니다.
다음은 the "LyonPointsOfInterest (FeatureServer)"의 기능 계층을 사용하는 입니다.
그러나 웹 서비스에서 반환 된 데이터를 기반으로 클라이언트 측 그래픽을 만드는 기능 레이어에서는 작동하지 않습니다.
3D 콜 아웃 회선에 제한이 있습니까?
하는 계층 정의에 따라 기능 층을 만들기 :
featureLayer = new FeatureLayer({ fields: this.layerDefinition.fields, objectIdField: this.layerDefinition.objectIdField, geometryType: this.layerDefinition.geometryType, id: this.layerId });
설정 상승 및 기능 감소와 렌더러 :
featureLayer.elevationInfo = { // elevation mode that will place points on top of the buildings or other SceneLayer 3D objects mode: "relative-to-scene" }; // feature reduction is set to selection because our scene contains too many points and they overlap featureLayer.featureReduction = { type: "selection" }; featureLayer.renderer = this._getUniqueValueRenderer() as any as Renderer// callout render
여기를
여기 내 코드입니다 렌더러 코드 :
그래픽의 배열에3210_getUniqueValueRenderer() { let verticalOffset = { // verticalOffset shifts the symbol vertically screenLength: 150, // callout line length maxWorldLength: 200, minWorldLength: 35 }, uniqueValueRenderer = { type: "unique-value", // autocasts as new UniqueValueRenderer() field: "AQHI", uniqueValueInfos: [{ value: 1, symbol: this._get3DCallOutSymbol(verticalOffset, "Museum.png", "#D13470") }, { value: 2, symbol: this._get3DCallOutSymbol(verticalOffset, "Restaurant.png", "#F97C5A") }, { value: 3, symbol: this._get3DCallOutSymbol(verticalOffset, "Church.png", "#884614") }, { value: 4, symbol: this._get3DCallOutSymbol(verticalOffset, "Hotel.png", "#56B2D6") }, { value: 5, symbol: this._get3DCallOutSymbol(verticalOffset, "Park.png", "#40C2B4") }, { value: 6, symbol: this._get3DCallOutSymbol(verticalOffset, "Museum.png", "#D13470") }, { value: 7, symbol: this._get3DCallOutSymbol(verticalOffset, "beer.png", "#F97C5A") }, { value: 8, symbol: this._get3DCallOutSymbol(verticalOffset, "senate.png", "#884614") }, { value: 9, symbol: this._get3DCallOutSymbol(verticalOffset, "Hotel.png", "#56B2D6") }, { value: 10, symbol: this._get3DCallOutSymbol(verticalOffset, "Park.png", "#40C2B4") } ]}; return uniqueValueRenderer; } _get3DCallOutSymbol(verticalOffset: any, iconName: string, color: string) { return { type: "point-3d", // autocasts as new PointSymbol3D() symbolLayers: [{ type: "icon", // autocasts as new IconSymbol3DLayer() resource: { href: this.iconPath + iconName }, size: 20, outline: { color: "white", size: 2 } }], verticalOffset: verticalOffset, callout: { type: "line", // autocasts as new LineCallout3D() color: "white", size: 2, border: { color: color } } }; }
설정 소스 생성 기반의 웹 서비스 데이터
featureLayer.source = graphics;
this.layerDefinition
를 사용하지만, 새로운 VAR에 넣어 안