<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta. http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Simple Map</title>
<link rel="stylesheet" type="text/css" href="http://esri-guo/arcgis_js_v32_sdk/arcgis_js_api/library/3.2/jsapi/js/dojo/dijit/themes/tundra/tundra.css"/>
<link rel="stylesheet" type="text/css" href="http://esri-guo/arcgis_js_v32_sdk/arcgis_js_api/library/3.2/jsapi/js/esri/css/esri.css" />
<script. type="text/javascript" src="http://esri-guo/arcgis_js_v32_sdk/arcgis_js_api/library/3.2/jsapi/init.js"></script>
<script. type="text/javascript">
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);
</script>
</head>
<body class="tundra">
<table>
<tr>
<td>
<div id="mapDiv" style="width:1500px; height:800px; border:1px solid #000;"></div>
</td>
<td>
<input id="Button1" type="button" value="定位" nclick='ptPosition()' /> <input id="Button2" type="button" value="回放" nclick=' ptcounntSplit();gogps()'/>
</td>
</tr> </table>
</body>
</html>

原文链接:http://www.gisall.com/html/72/124272-8160.html

【转】基于ArcGIS for javascript api 轨迹回放的更多相关文章

  1. Arcgis for Javascript API下类似于百度搜索A、B、C、D marker的实现方式

    原文:Arcgis for Javascript API下类似于百度搜索A.B.C.D marker的实现方式 多说无益,首先贴两张图让大家看看具体的效果: 图1.百度地图搜索结果 图2.Arcgis ...

  2. ArcGIS For JavaScript API 默认参数

    “esri.config”的是在1.3版中的的“esriConfig”的替代品.如果您使用的是1.2或更低的版本,您应该参阅默认API v1.2和更低的配置.对于版本1.3或更高版本,您可以使用“es ...

  3. 利用Arcgis for javascript API绘制GeoJSON并同时弹出多个Popup

    1.引言 由于Arcgis for javascript API不可以绘制Geojson,并且提供的Popup一般只可以弹出一个,在很多专题图制作中,会遇到不少的麻烦.因此本文结合了两个现有的Arcg ...

  4. arcgis for JavaScript API 4.5与4.3的区别

    arcgis 4.5与4.3区别: 鉴于本人使用4.3时间比较久,而arcgis for JavaScript API于9月28日推出了4.5版本,但是直接更换4.5的init.js会出现意想不到的错 ...

  5. [转]MBTiles 离线地图演示 - 基于 Google Maps JavaScript API v3 + SQLite

    MBTiles 是一种地图瓦片存储的数据规范,它使用SQLite数据库,可大大提高海量地图瓦片的读取速度,比通过瓦片文件方式的读取要快很多,适用于Android.IPhone等智能手机的离线地图存储. ...

  6. ArcGIS API for JavaScript开发笔记(一)——ArcGIS for Javascript API 3.14本地部署

    堪称史上最详细的< ArcGIS forJavascript API 3.14本地部署>文档,有图有真相~~~ ---------环境:Windows server 2012R2,IIS ...

  7. ArcGIS Server JavaScript API 各命名空间的含义【转】

    1.esri 命名空间      所有的对象都是在 esri 命名空间下的,esri 有自己的属性和方法.      如 esri.version 返回当前 JavaScript API 的版本号.e ...

  8. 【ArcGIS for JavaScript api】Clusterlayer聚簇类

    1.作用: 聚簇类是用于前端显示优化,使POI点要素显示更为美观.大量的Marker距离太近会引起压盖而对浏览或者操作产生不便,因此,一般在超过1K点的时候,用此类.. 2.使用方式: 1: // c ...

  9. MBTiles 离线地图演示 - 基于 Google Maps JavaScript API v3 + SQLite

    MBTiles 是一种地图瓦片存储的数据规范,它使用SQLite数据库,可大大提高海量地图瓦片的读取速度,比通过瓦片文件方式的读取要快很多,适用于Android.IPhone等智能手机的离线地图存储. ...

随机推荐

  1. Python--day29--configparser模块(配置)(不熟,以后要找时间重学)

  2. 【codeforces 762B】USB vs. PS/2

    time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...

  3. es6 let和const的用法

    ]()) {; } //console.log(MAX);//MAX is not defined" /*也有暂时性死区,声明的位置需要在使用前面,否则报错: * 不能重复声明变量 * */ ...

  4. Git用在公司项目上的操作

    修改代码后再次提交 搭档优化好他自己的代码后,我想在vscode上看看他优化后的结果 此时直接git pull origin就可以看到了 j接下来的一些指令,慢慢了解... 分支本身已经在我上面 以下 ...

  5. POJ 3311 Hie with the Pie 兼 Codevs 2800 送外卖(动态规划->TSP问题)

    Description The Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possi ...

  6. dotnet 通过 WMI 获取系统补丁

    本文告诉大家如何通过 WMI 获取补丁 通过 Win32_QuickFixEngineering 可以获取系统启动的服务 下面代码只是获取补丁的 kb 字符 const string query = ...

  7. Python_自定义关键字的使用

    1.在Python中新建一个套件MOSAPP(一般为APP名称):New Suite→Directory 2.在套件下新建个资源文件My:New Resource:My 3.在My资源文件库下新建个关 ...

  8. python常见关键字的使用

    常见关键字 在循环中常见的关键字使用方法 continue:结束本次循环,继续执行下一次循环 break:跳出一个循环或者结束一个循环 例 使用用户名密码登录(有三次机会)count=0while c ...

  9. 周志华《机器学习》高清电子书pdf分享

    周志华<机器学习>高清电子书pdf下载地址 下载地址1:https://545c.com/file/20525574-415455837 下载地址2: https://pan.baidu. ...

  10. spring boot 中事物的使用

    一.什么是事务? 事务,通俗的说就是,同时做多个事,要么全做,要么不做,也是其特性.举个例子来说,好比你在某宝.某东.某多上购物,在你提交订单的时候,库存也会相应减少,不可能是钱付了,库存不减少,或者 ...