ArcGIS JavaScript API使用Promise进行公交换乘查询及结果绘制

arcgis js 完整悬停效果实现 整理了75个JS高频面试题,并给出了答案和解析,基本上可以保证你能应付面试官关于JS的提问。 阅读详情

两个方法,一个用于根据站点名称获得站点的点对象(包含坐标信息),另一个是根据站点信息进行线路的处理及展示。代码如下:

        /**
         * 获取公交站点
         * @param  {[type]} stationName [站点名称]
         * @param  {[type]} lineName    [站点所在线路名称]
         * @return {[type]}             [Point,包含坐标]
         */
        getStationPoint:function(stationName,lineName){
            var p = new Promise(function(resolve,reject){
                var queryTask = new QueryTask(this.busStationLayerURLProperty);
                var query = new Query();
                query.returnGeometry=true;
                var where=this.belongLineNameProperty+"='"+lineName+"' and "+this.stationNameProperty+"= '"+stationName+"'";
                query.where = where;
                query.outFields=["*"];
                queryTask.execute(query).then(function(result){
                    if(1!=result.features.length){
                        reject("bad result");
                    }else {
                        resolve(result.features[0].geometry);
                    }
                }.bind(this));
            }.bind(this));
            return p;
        },
        
        /**
         * 获取及显示换乘线路
         * @param  {[type]} lineNames [线路名,如有多条,以逗号隔开]
         * @return {[type]}           [description]
         */
        getChangeLine: function(lineNames) {
            _this = this;
            var queryTask = new QueryTask(_this.busLineLayerURLProperty);
            var query = new Query();
            query.returnGeometry = true;
            var where = "";
            for (var i = 0; i < lineNames.length; i++) {
                if (i == 0) {
                    where = _this.lineNameProperty + "= '" + lineNames[i] + "'";
                } else
                    where = where + " or " + _this.lineNameProperty + "= '" + lineNames[i] + "'";
            }

            //获取出发站、到达站、换乘站
            var startStation = dom.byId(_this.startStationId).getElementsByTagName("input")[0].value;
            var endStation = dom.byId(_this.endStationId).getElementsByTagName("input")[0].value;
            var changeStation = _this.currentChangeStation;

            query.where = where;
            query.outFields = ["*"];
            queryTask.execute(query, function(lines) {
                var numLine = lines.features.length;
                if (numLine > 1) {
                    var startLine; //第一条线路Polyline的乘车区间段
                    var endLine;  //第二条线路Polyline的乘车区间段
                    var firstLine;  //第一条线路Polyline对象
                    var secondLine;  //第二条线路Polyline对象
                    var lineName1 = lineNames[0]; //第一条线路名
                    var lineName2 = lineNames[1];  //第二条线路名

                    for (var i = 0; i < 2; i++) {
                        if (lines.features[i].attributes[_this.lineNameProperty] === lineName1) {
                            firstLine=lines.features[i].geometry;
                            Promise //根据站点名获取站点(Point),两个站点都获取完成后,进行乘车区间切割
                            .all([_this.getStationPoint(changeStation,lineName1),_this.getStationPoint(startStation,lineName1)])                      
                            .then(
                                function(stations){
                                    console.log("resolved start");
                                    if(2==stations.length){
                                        startLine = _this.getCutLine(stations[0], stations[1], firstLine); //切割乘车区间
                                        if (startLine) { //绘制乘车区间
                                            var graphicS = new Graphic(startLine);
                                            graphicS.setSymbol(_this.simpleLineSymbol);
                                            _this.graphicLayer.add(graphicS);
                                        }
                                    }
                                }
                                );
                        } else {
                            secondLine= lines.features[i].geometry;
                            Promise
                            .all([_this.getStationPoint(changeStation,lineName2),_this.getStationPoint(endStation,lineName2)])
                            .then(
                                function(stations){
                                    console.log("resolved end");
                                    endLine = _this.getCutLine(stations[0], stations[1], secondLine);
                                    if (endLine) {
                                        var graphicE = new Graphic(endLine);
                                        graphicE.setSymbol(_this.simpleLineSymbol);
                                        _this.graphicLayer.add(graphicE);
                                    }
                                }
                                );
                        }
                    }

                    //合并线路,获得外接矩形范围并显示
                    var unionGeometry = geometryEngine.union(lines.features[0].geometry,lines.features[1].geometry);
                    var newExtent = unionGeometry.getExtent();
                    _this.map.setExtent(newExtent.expand(2));
                    console.log("OK");
                } else {
                    error("查找的换乘线路少于两条,无法获取线路!");
                    return false;
                }
            });
        },


公交换乘功能实现方法 公交 body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;} var map=null;  map=new STMapObj("div_map");  map.locateMap(new STMapPoint(121.43745399,31.171535 阅读详情

相关推荐

空间数据可视化:ArcGIS JavaScript API 二、三维数据一体化

ESRI不愧为GIS业界巨头,从本科起就开始接触ArcGIS系列,桌面端从ArcMap 到 ArcPro,服务端从ArcIMS 到 ArcServer,无不体现了这个了不起的公司在与时俱进、不断创新。现在的一些列产品好多我都没有用过,像 portal,pro,webbuilder.........网络GIS 现在好像是只更新JavaScript了,GIS与计算机的关系,都被ESRI公司的产品体现的

探索地理之源 分享GIS价值 1万+

ArcGIS API For JavaScript - 交通绘制(线、面、圆)

@{ Layout = null; } <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>Draw</title> @*加载高德地图*@ <script type="text/javascript"> var dojoConfig =

技术共享,共同进步! 902

arcgis版的公交线路图-一起分享

arcgis版的公交线路图-一起分享arcgis版的公交线路图-一起分享arcgis版的公交线路图-一起分享arcgis版的公交线路图-一起分享arcgis版的公交线路图-一起分享arcgis版的公交线路图-一起分享arcgis版的公交线路图-一起分享arcgis版的公交线路图-一起分享arcgis版的公交线路图-一起分享arcgis版的公交线路图-一起分享arcgis版的公交线路图-一起分享

ArcGIS API For JavaScript官方文档(六)之设置范围

    使用地图的一个常见操作是设置地图的extent(范围)或获取在其他操作中使用的extent。在map上设置新extent的简单替代方案是调用map的centerAndZoom()方法,该方法基于给定中心点和细节级别(level of detail-LOD)设置新的extent。1、默认的extent    如果在初始化map时不包含extent信息,默认extent作为初始化extent信...

不睡觉的怪叔叔的博客 1万+

公交ic卡刷卡记录的居民出行od推算方法

公交ic卡刷卡记录的居民出行od推算方法,想了解这个方法的可以参考了

python实现RsaWithSHA256签名以及国密Sm3WithSm2签名

【代码】python实现RsaWithSHA256签名以及国密Sm3WithSm2签名。

weixin_45005677的博客 3357

ArcGIS for javascript4.14 新特性演示(一)

先上图:更新之一是可以在要素图层上设置时间“offset”的功能。 示例演示如何在利用FeatureLayer的timeOffset属性的同时使用TimeSlider小部件。该属性用于将图层的timeInfo偏移一定的TimeInterval,以覆盖来自两个或多个具有不同时间范围的时间感知图层的要素。 const url = "https://services.arcgis.com/V6ZH...

RADI的博客 585

保姆级教程:用YOLOv8n模型在RKNN和Horizon平台完成目标检测(附C++部署代码与性能实测)

本文提供了一份详尽的YOLOv8n模型在RKNN和Horizon平台上的部署指南,涵盖环境配置、模型优化、跨平台适配及性能调优。通过实战案例和C++部署代码,帮助开发者在嵌入式设备上高效实现目标检测,显著提升推理性能。

weixin_42659194的博客 469

arcgis api 4.11 多线程worker使用

1.项目背景: 由于软件需要在刚开始启动的时候,只需要加载在一个市区面polygon内的点Graphics数组(相当于相交)到GraphicsLayer中并展现在地图中,这其中就需要过滤掉不在这个polygon内的点,因为我用的GraphicsLayer图层。这个图层并没有提供SpatialFilter之类的方法,能够直接过滤。所以只能选择循环一个个的graphics和polygon进...

yangniceyangyang的博客 858

保姆级教程:用CANoe的LIN Slave Conformance Tester搞定一致性测试(附LDF配置避坑点)

本文详细介绍了如何使用CANoe的LIN Slave Conformance Tester进行汽车电子LIN从节点一致性测试,包括测试环境搭建、LDF文件配置、多通道测试技巧及常见问题解决方案。通过实战案例和高级配置技巧,帮助工程师高效完成测试任务,确保LIN总线通信的可靠性。

weixin_30385925的博客 528

Vivado中怎么做set_input_delay约束

参考:https://forums.xilinx.com/t5/Timing-Analysis/Hold-violation-in-ISERDES/td-p/715121前言在STA中,要分析上游器件和FPGA之间的时序关系就得指定inputdelay。流程什么是inputdelay:约定上游芯片输出及时钟之间的关系。约束的目的就是看适配后的时序关系是什么样的。以下以源同步接口举例,...

小翁同学 6560

ArcGIS API for JavaScript 报错Uncaught(in promise):TypeError:xxx is not a constructor

前言 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;在使用ArcGIS API JavaScript时,报出了以下错误: 错误原因 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;我们在使用ArcGIS API时用require导入相关的包的时候,后面的function中的参数参数要和require中包的顺

idomyway的博客 1万+

SAP SD模块进阶:VA31和VA01底层竟是同一个BAPI?揭秘销售单据创建的统一逻辑

本文深入解析SAP SD模块中VA31和VA01的底层统一架构设计,揭示两者如何通过同一个BAPI `SD_SALESDOCUMENT_CREATE`实现销售单据创建。通过ABAP调试和参数化设计分析,展示了SAP如何利用单据类型(doc_type)等关键字段实现业务逻辑复用,为开发者提供配置化设计的重要启示。

weixin_30561177的博客 246

公交换乘GIS地图应用解决方案

公交线路换乘系统 公交线路换乘系统通过基于单位名址、行业,线路名称,线路类别(早/晚高峰车,夜宵车,地铁)等多条件的查询,向查询用户提供所查询企业或商家周边公交轨道等相关信息,以及从用户出发点到被查询位置所在地的到达方式或行车路线等信息内容,并在此基础上提供短信发送、电话指路等服务。...

372

320x240 TFT屏的SPI DMA驱动避坑指南:基于HC32F460的时序调试心得

本文详细介绍了基于HC32F460 MCU驱动320x240 TFT屏的SPI DMA实战经验,涵盖硬件设计、波形诊断、DMA优化及高级调试技巧。重点解析SPI时序配置、DMA缓冲区对齐等常见问题,并提供逻辑分析仪波形诊断方法和性能优化策略,帮助开发者规避典型陷阱,提升显示性能。

weixin_42639246的博客 373

Android Framework SurfaceFlinger面试题及参考答案

请简述 SurfaceFlinger 在 Android 系统中的作用。 SurfaceFlinger 是 Android 系统中一个非常关键的服务。它主要负责将多个应用程序的 Surface 合成到一个屏幕显示内容中。 从应用程序的角度来看,每个应用都有自己的 UI 界面,这些 UI 界面实际上是由一系列的图层(Surface)构成。例如,一个应用可能有背景图层、按钮图层、文本图层等。应用通过向 SurfaceFlinger 提供这些 Surface 来请求显示。 SurfaceFl

大模型大数据攻城狮的专栏 1188

ArcGIS JavaScript API实现Polyline外两点分割该线

背景:   某项目要做一个公交换乘查询。以最简单的情况为例,即只需乘坐一次车,不需换乘即可到达。线路A包含若干个站点(A0,A1,A2,...,An),其中A0为线路起始站点,An为终止站点。已获取出发的站点(As,其中0 As、Ae位于站点图层中,其坐标在空间上可能位于线路Polyline上,也可能与线路稍有偏差,不落在线上。 在进行乘车线路展示时,需要截取该线路位于出发站点As、到达站点

a_dev的专栏 3679

AIGC游戏开发:如何评估生成内容的玩家满意度?

如何量化评估生成内容对玩家体验的影响?本文聚焦AIGC生成的游戏内容(包括但不限于剧情、关卡、NPC对话、道具),系统探讨玩家满意度的评估方法论,覆盖主观与客观评估、静态与动态内容、短期与长期体验等场景。核心概念:定义AIGC与玩家满意度的关联维度;评估方法:主观(问卷/访谈)与客观(行为/生理数据)评估的技术细节;数学模型:构建多指标融合的评估模型;实战案例:以AIGC生成关卡为例,演示从数据采集到模型落地的全流程;工具资源:推荐数据采集、分析与建模的工具链;

AI天才研究院 1225

ArcGIS JavaScript API 4.0 beta 1

已经发布的ArcGIS JavaScript API 4.0有着最前沿的新特性,这是一个更加改善开发者体验的并继续成为顶级的Web制图API。它提供了更加简洁明了的API。另外,3D支持也已经实现了。本文以ArcGIS for Developer中ArcGIS JavaScript API 4.0的英文文档为参考,结合实际自己理解编写本文档,有不正确之处还望多多见谅。

ArcGIS产品与技术专栏 2691

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

公交换乘数据接口 查询具体换乘方式

公交换乘数据,此接口可根据起点终点经纬度,查询具体换乘方式。 接口名称:公交换乘数据 接口平台:webapi 接口地址:http://api.juheapi.com/bus/transfer 支持格式:json 请求方式:GET/POST 请求示例:http://api.juhe...

chuju5680的博客 388

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

JavaScript基础——Promise函数

异步操作 JavaScript的异步处理可以用回调函数,回调函数的使用就是确保一段代码执行完毕之后再执行另一段代码的方式 function doHomework(subject, callback){ console.log("start my " + subject + " homework."); callback(); } function finish(){ console.log(...

goldgirly的博客 1617

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

ArcGis API for JavaScript——动态图表

**ArcGis API for JavaScript——动态图表** ArcGIS API for JS是基于Dojo的,Dojo提供了一系列对于图表的操作。在本例子中首先介绍一个简单的chart例子,再介绍动态加载数据源的chart例子。 Dojo Chart的官方文档:http://dojotoolkit.org/reference-guide/1.10/dojox/chartin

我的优快云 3224

ArcGIS API For Javascript(针对版本4.x)

来源: https://www.bilibili.com/video/BV1Mf4y1D7Eb ArcGIS APl for JavaScript是什么? 用来构建2D和3D地图应用的一套简单、易用的API,具备强大制图能力和基于数据驱动的地图可视化能力,用来构建WebGIS系统。 特性:三维支持更加完善,BIM支持进一步加强 特性:三维与GP服务结合,解决三维世界更多实际问题。 特性:根据用户需求和发展趋势,不断增加和更新功能 特性:数据驱动的可视化,让数据变得更加直观和美观 升级指南 属性: ○例如:

体验新模板 4040

ES6的promise对象研究

ES6的promise对象研究 什么叫promise?      Promise对象可以理解为一次执行的异步操作,使用promise对象之后可以使用一种链式调用的方式来组织代码;让代码更加的直观。 那我们为什么要使用promise? 比如我们在工作中经常会碰到这么一个需求,比如我使用ajax发一个A请求后,成功后拿到数据,我们需要把数据传给B请求;那么我们需要如下编写代码: $....

weixin_34290000的博客 611

arcgis 4 与deckgl 整合 (一)

arcgis 官网有与deckgl整合的二维 三维整合也是可以,不过还是有点bug 我们先构建基础类 基础图层 const {loadArcGISModules} = require("@deck.gl/arcgis"); export default class BaseLayer { layer: any; init(view: any) { return new Promise((resolve, reject) => { loadArcGISModules().then(({DeckLayer

haibalai2009的博客 992
上一篇: ArcGIS JavaScript API实现Polyline外两点分割该线
下一篇: 禅道BUG解决方案的各种说辞
acngiser
博客等级 码龄15年 118粉丝 214原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值