arcgis api 3(1)

{“id”:5, “x”:110.551524, “y”:37.151942, “radius”:150000},

{“id”:6, “x”:105.640902, “y”:39.126654, “radius”:170000},

{“id”:7, “x”:106.005868, “y”:38.125725, “radius”:160000},

{“id”:8, “x”:107.545122, “y”:34.951701, “radius”:130000},

{“id”:9, “x”:110.411982, “y”:31.777678, “radius”:150000},

{“id”:10, “x”:113.019257, “y”:28.194103, “radius”:130000},

{“id”:11, “x”:116.535467, “y”:26.871059, “radius”:110000},

{“id”:12, “x”:117.470083, “y”:23.943192, “radius”:100000}];

var map, clickLayer,sr;

var index = 0,t=0;

require([

“esri/map”,

“esri/layers/ArcGISDynamicMapServiceLayer”,

“esri/layers/GraphicsLayer”,

“esri/symbols/PictureMarkerSymbol”,

“esri/symbols/SimpleLineSymbol”, //简单线符号

“esri/symbols/SimpleMarkerSymbol”,

“esri/symbols/SimpleFillSymbol”,

“esri/geometry/Circle”,

“esri/geometry/Polyline”,

“esri/graphic”,

“dojo/_base/Color”,

“esri/geometry/Point”,

“dojo/on”,

“dojo/dom”,

“dojo/domReady!”],

function(Map,

ArcGISDynamicMapServiceLayer,

GraphicsLayer,

PictureMarkerSymbol,

SimpleLineSymbol,

SimpleMarkerSymbol,

SimpleFillSymbol,

Circle,

Polyline,

Graphic,

Color,

Point,

on,

dom

) {

map = new Map(“map”);

var tiled = new ArcGISDynamicMapServiceLayer(“http://localhost:6080/arcgis/rest/services/firstTest/firstService/MapServer”);

map.addLayer(tiled, 0);

sr = map.spatialReference;

var mapCenter = new Point(103.847, 36.0473, sr);

map.centerAndZoom(mapCenter);

clickLayer = new GraphicsLayer({“id”:“clickLayer”});

map.addLayer(clickLayer);

on(dom.byId(“addPath”), “click”, function(){

console.log(path);

addPath();

});

function addPath(){

var sms = new SimpleMarkerSymbol({

“color”: [255,0,0,255],

“size”: 4,

“angle”: -30,

“xoffset”: 0,

“yoffset”: 0,

“type”: “esriSMS”,

“style”: “esriSMSCircle”,

“outline”: {

“color”: [255,0,0,255],

“width”: 1,

“type”: “esriSLS”,

“style”: “esriSLSSolid”

}

});

var sls = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,

new Color([255, 0, 0]),

2

);

var sfs = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,

new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT,

new Color([32,149,217,0.6]), 2),new Color([32,149,217,0.6])

);

var ptStart = new Point(path[index].x, path[index].y, sr);

var ptEnd = new Point(path[index+1].x, path[index+1].y, sr);

var gPtStart = new Graphic(

ptStart,

sms

);

var gCircleStart = new Graphic(

new Circle(ptStart, {“radius”:path[index].radius}),

sfs

);

var gPtEnd = new Graphic(

ptEnd,

sms

);

var gCircleEnd = new Graphic(

new Circle(ptEnd, {“radius”:path[index+1].radius}),

sfs

);

var polylineJson = {

“paths”:[[[path[index].x,path[index].y], [path[index+1].x,path[index+1].y]]],

“spatialReference”:{“wkid”:4326}

最后

今天的文章可谓是积蓄了我这几年来的应聘和面试经历总结出来的经验,干货满满呀!如果你能够一直坚持看到这儿,那么首先我还是十分佩服你的毅力的。不过光是看完而不去付出行动,或者直接进入你的收藏夹里吃灰,那么我写这篇文章就没多大意义了。所以看完之后,还是多多行动起来吧!

可以非常负责地说,如果你能够坚持把我上面列举的内容都一个不拉地看完并且全部消化为自己的知识的话,那么你就至少已经达到了中级开发工程师以上的水平,进入大厂技术这块是基本没有什么问题的了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值