首页 > 技术文章 > ArcGIS API for JavaScript根据两个点坐标在地图上画线

seeug 2020-05-21 16:54 原文

 

ArcGIS API for JavaScript根据两个点坐标在地图上画线
比如说a(xxxx,xxxxx),b(xxxx,xxxxx)。利用这两个点画一条线

 

 

var polyline = new esri.geometry.Polyline([[xxx,xxx],[xxx,xxx]]);
var symbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,255,0]), 2);
var graphic = new esri.Graphic(polyline, symbol);
map.graphics.add(graphic);


感谢您的阅读,如果您觉得阅读本文对您有帮助,请点一下“推荐”按钮。本文欢迎各位转载,但是转载文章之后必须在文章页面中给出作者和原文连接

推荐阅读