区块链技术博客
www.b2bchain.cn

arcgis 4 与deckgl 整合 (三)求职学习资料

本文介绍了arcgis 4 与deckgl 整合 (三)求职学习资料,有助于帮助完成毕业设计以及求职,是一篇很好的资料。

对技术面试,学习经验等有一些体会,在此分享。

针对HexagonLayer

HexagonLayer 的数据构建器

const axios = require('axios')  export default class TripsLayerParser {   static getDataFromUrl(url: string) {     return new Promise((resolve => {       const queryUrl = `${url}/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=%5B%5D&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&resultOffset=&resultRecordCount=&queryByDistance=&returnExtentsOnly=false&datumTransformation=&parameterValues=&rangeValues=&f=geojson`       axios.get(queryUrl).then((r: any) => {         resolve(r.data.features);       });     }));   }    static getDataFromJsonUrl(url: string) {     return new Promise((resolve => {       axios.get(url).then((r: any) => {         resolve(r.data.features);       });     }));   } }

三维base

const {loadArcGISModules} = require("@deck.gl/arcgis");   export default class BaseLayer3D {   deckRender: any;    init(_view: any) {       return loadArcGISModules(['esri/views/3d/externalRenderers']).then(({DeckRenderer, modules}: any) => {         const view = _view;         const [externalRenderers] = modules;         this.deckRender = new DeckRenderer(view, {});         externalRenderers.add(view, this.deckRender);       });   }    removeLayer() {     this.deckRender.deck.layers = [];   } }

DeckHexagonLayer 主类
“` javascript

import HexagonLayerParser from “./HexagonLayerParser”;
import ColorManager from “./ColorManager”;
import BaseLayer3D from “./BaseLayer3D”;

const {HexagonLayer} = require(“@deck.gl/aggregation-layers”);

interface INoop {
(args?: T): void
}

const noop: INoop = () => {
}

针对HexagonLayer

HexagonLayer 的数据构建器

const axios = require('axios')  export default class TripsLayerParser {   static getDataFromUrl(url: string) {     return new Promise((resolve => {       const queryUrl = `${url}/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=%5B%5D&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&resultOffset=&resultRecordCount=&queryByDistance=&returnExtentsOnly=false&datumTransformation=&parameterValues=&rangeValues=&f=geojson`       axios.get(queryUrl).then((r: any) => {         resolve(r.data.features);       });     }));   }    static getDataFromJsonUrl(url: string) {     return new Promise((resolve => {       axios.get(url).then((r: any) => {         resolve(r.data.features);       });     }));   } }

三维base

const {loadArcGISModules} = require("@deck.gl/arcgis");   export default class BaseLayer3D {   deckRender: any;    init(_view: any) {       return loadArcGISModules(['esri/views/3d/externalRenderers']).then(({DeckRenderer, modules}: any) => {         const view = _view;         const [externalRenderers] = modules;         this.deckRender = new DeckRenderer(view, {});         externalRenderers.add(view, this.deckRender);       });   }    removeLayer() {     this.deckRender.deck.layers = [];   } }

DeckHexagonLayer 主类
“` javascript

import HexagonLayerParser from “./HexagonLayerParser”;
import ColorManager from “./ColorManager”;
import BaseLayer3D from “./BaseLayer3D”;

const {HexagonLayer} = require(“@deck.gl/aggregation-layers”);

interface INoop {
(args?: T): void
}

const noop: INoop = () => {
}

针对HexagonLayer

HexagonLayer 的数据构建器

const axios = require('axios')  export default class TripsLayerParser {   static getDataFromUrl(url: string) {     return new Promise((resolve => {       const queryUrl = `${url}/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=%5B%5D&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&resultOffset=&resultRecordCount=&queryByDistance=&returnExtentsOnly=false&datumTransformation=&parameterValues=&rangeValues=&f=geojson`       axios.get(queryUrl).then((r: any) => {         resolve(r.data.features);       });     }));   }    static getDataFromJsonUrl(url: string) {     return new Promise((resolve => {       axios.get(url).then((r: any) => {         resolve(r.data.features);       });     }));   } }

三维base

const {loadArcGISModules} = require("@deck.gl/arcgis");   export default class BaseLayer3D {   deckRender: any;    init(_view: any) {       return loadArcGISModules(['esri/views/3d/externalRenderers']).then(({DeckRenderer, modules}: any) => {         const view = _view;         const [externalRenderers] = modules;         this.deckRender = new DeckRenderer(view, {});         externalRenderers.add(view, this.deckRender);       });   }    removeLayer() {     this.deckRender.deck.layers = [];   } }

DeckHexagonLayer 主类
“` javascript

import HexagonLayerParser from “./HexagonLayerParser”;
import ColorManager from “./ColorManager”;
import BaseLayer3D from “./BaseLayer3D”;

const {HexagonLayer} = require(“@deck.gl/aggregation-layers”);

interface INoop {
(args?: T): void
}

const noop: INoop = () => {
}

部分转自互联网,侵权删除联系

赞(0) 打赏
部分文章转自网络,侵权联系删除b2bchain区块链学习技术社区 » arcgis 4 与deckgl 整合 (三)求职学习资料
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

b2b链

联系我们联系我们