博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【转】基于ArcGIS for javascript api 轨迹回放
阅读量:6117 次
发布时间:2019-06-21

本文共 4435 字,大约阅读时间需要 14 分钟。

      
Simple Map
dojo.require("esri.map"); dojo.require("esri.toolbars.draw"); dojo.require("esri.graphic"); dojo.require("esri.layers.graphics"); dojo.require("esri.geometry"); var ptcount = "13740395.6058,5130594.7971/13740385.6058,5130594.7971/13740375.6058,5130594.7971/13740365.6058,5130594.7971/13740355.6058,5130594.7971/13740355.6058,5130583.7971/13740355.6058,5130572.7971/13740355.6058,5130561.7971/13740355.6058,5130550.7971/13740355.6058,5130549.7971/13740355.6058,5130538.7971/13740355.6058,5130527.7971/13740355.6058,5130516.7971/13740355.6058,5130505.7971/13740355.6058,5130494.7971/13740355.6058,5130483.7971/13740355.6058,5130472.7971/13740355.6058,5130461.7971/13740355.6058,5130450.7971/13740355.6058,5130449.7971/13740355.6058,5130438.7971/13740355.6058,5130427.7971/13740355.6058,5130416.7971/13740355.6058,5130405.7971/13740355.6058,5130394.7971/13740355.6058,5130383.7971/13740355.6058,5130372.7971/13740355.6058,5130361.7971/13740355.6058,5130350.7971/13740355.6058,5130349.7971/13740355.6058,5130328.7971/13740355.6058,5130317.7971/13740355.6058,5130306.7971/13740355.6058,5130295.7971/13740355.6058,5130284.7971/13740355.6058,5130273.7971/13740355.6058,5130262.7971/"; var list; var defaultSymbol; var myMap; var icount; var i = 0; function ptcounntSplit() { list = ptcount.split("/"); icount= list.length; //alert(list[0].substring(0,list[0].indexOf(','))); //alert(list[0].substring(list[0].indexOf(',')+1, list[0].length)); } function ptPosition() { var pointSymbol = new esri.symbol.SimpleMarkerSymbol(); pointSymbol.setOutline = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 1); pointSymbol.setSize(5); pointSymbol.setColor(new dojo.Color([0, 255, 0, 0.25])); var geometry = new esri.geometry.Point(13740395.6058, 5130594.7971); var graphic = new esri.Graphic(geometry, pointSymbol); myMap.graphics.add(graphic); // var point = new esri.geometry.Point({ "x": 13740395.6058, "y": 5130594.7971, " spatialReference": { " wkid": 102100} }); myMap.centerAndZoom(geometry, 20); } function go() { var pointSymbol = new esri.symbol.SimpleMarkerSymbol(); pointSymbol.setOutline = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 1); pointSymbol.setSize(5); pointSymbol.setColor(new dojo.Color([0, 255, 0, 0.25])); //alert(list[i]); var geometry = new esri.geometry.Point(list[i].substring(0, list[i].indexOf(',')), list[i].substring(list[i].indexOf(',') + 1, list[i].length)); var graphic = new esri.Graphic(geometry, pointSymbol); myMap.graphics.add(graphic); var extent = myMap.extent; if (!extent.contains(graphic.geometry)) { myMap.centerAt(geometry); } i++; } function gogps() { go(); if (i < icount) { window.setTimeout("gogps()", "2000"); } else { window.clearTimeout("gogps()"); } } function init() { //var myMap = new esri.Map("mapDiv"); var customExtentAndSR = new esri.geometry.Extent(13676444.4499247, 5092822.83792968, 13781163.1786753, 5160163.85984883, new esri.SpatialReference({ "wkid": 102100})); myMap = new esri.Map("mapDiv", {extent:customExtentAndSR}); //note that if you do not have public Internet access then you will need to point this url to your own locally accessible cached service. var myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://www.arcgisonline.cn/ArcGIS/rest/services/ChinaCities_Community_BaseMap_CHN/ShenYang_Community_BaseMap_CHN/MapServer"); myMap.addLayer(myTiledMapServiceLayer); } dojo.addOnLoad(init);

原文链接:

转载于:https://www.cnblogs.com/leebokeyuan/p/8342387.html

你可能感兴趣的文章
云时代架构阅读笔记之四
查看>>
WEB请求处理一:浏览器请求发起处理
查看>>
Lua学习笔记(8): 元表
查看>>
PHP经典算法题
查看>>
LeetCode 404 Sum of Left Leaves
查看>>
醋泡大蒜有什么功效
查看>>
hdu 5115(2014北京—dp)
查看>>
数据结构中常见的树(BST二叉搜索树、AVL平衡二叉树、RBT红黑树、B-树、B+树、B*树)...
查看>>
PHP读取日志里数据方法理解
查看>>
第五十七篇、AVAssetReader和AVAssetWrite 对视频进行编码
查看>>
Vivado增量式编译
查看>>
一个很好的幻灯片效果的jquery插件--kinMaxShow
查看>>
微信支付签名配置正确,但返回-1,调不出支付界面(有的手机能调起,有的不能)...
查看>>
第二周例行报告
查看>>
多线程条件
查看>>
黄聪:VMware安装Ubuntu10.10【图解】转
查看>>
Centos 6.x 升级openssh版本
查看>>
公式推♂倒题
查看>>
vue实现点击展开,点击收起
查看>>
如何使frame能居中显示
查看>>