arcgis api結合echarts實現軌跡動畫

2021-10-11 01:12:17 字數 3364 閱讀 9326

arcgis api結合echart 軌跡title

>

rel=

"stylesheet"

href

="">

>

html, body

#map

style

>

head

>

>

type

="button"

value

="測試資料1"

onclick

="getdata(data1)"

>

type

="button"

value

="測試資料2"

onclick

="getdata(data2)"

>

"map"

>

div>

src=

"echarts.js"

>

script

>

src=

"">

script

>

>

var map, getdata, dellist, data1, data2;

require([

"esri/map"

,'esri/layers/arcgistiledmapservicelayer'

,'esri/geometry/extent'

,"echarts3layer.js"

,"dojo/domready!"],

function

( map,

arcgistiledmapservicelayer,

extent,

echarts3layer)})

map =

newmap

("map",)

;var mytiledmapservicelayer =

newarcgistiledmapservicelayer

("");

map.

addlayer

(mytiledmapservicelayer)

map.on(

'load'

,function()

)//轉為float型別

function

tonum

(n)//測試資料1

data1 =[,

,,]//測試資料2

data2 =[,

,,]//場景chart例項

var overlay =

newecharts3layer

(map, echarts)

;var chartscontainer = overlay.

getechartscontainer()

;var mychart = overlay.

initecharts

(chartscontainer)

;var zcpoints =

//正常點集合

var gjpoints =

//告警點集合

var gzpoints =

//故障點集合

var zclineft =

var zclinetf =

var gjlineft =

var gjlinetf =

var gzlineft =

var gzlinetf =

//各軌跡集合清空

dellist

=function()

//獲取資料渲染軌跡

getdata

=function

(data)

var tlon =

tonum

(data[i]

.to_lon)

var tlat =

tonum

(data[i]

.to_lat)

var tpoint =

var ft =

[//流向線 from至to,]

var tf =

[//流向線 to至from,]

if(data[i]

.type ==

"正常")if

(data[i]

.type ==

"告警")if

(data[i]

.type ==

"故障")}

}//配置

var myseries =

myseries.

push(,

linestyle:},

data: zclineft

},,linestyle:},

data: zclinetf

},,linestyle:},

data: gjlineft

},,linestyle:},

data: gjlinetf

},,linestyle:},

data: gzlineft

},,linestyle:},

data: gzlinetf

},,symbolsize:6,

symbolsize:10,

itemstyle:},

data: zcpoints

},,symbolsize:6,

symbolsize:10,

itemstyle:},

data: gjpoints

},,symbolsize:6,

symbolsize:10,

itemstyle:},

data: gzpoints

});var option =},

geo:},

roam:

true

, itemstyle:

, emphasis:}}

, series: myseries

}mychart.

setoption

(option)}}

);script

>

body

>

html

>

arcgis api更改view事件

使用者觸發事件一般是通過view互動,無法和map和layer直接互動。一般情況下,通過和view互動就可以滿足平常的需求 為當前檢視繫結click事件 注意需要把繫結用變數儲存 let viewlistener currentview.on click function data 儲存的繫結變數v...

結合php PHP與jQuery結合的功能

主要問題難點在於 獲取後台填充資料沒問題,但是當後台資料已失效,前台資料已獲取後,這種歷史遺留資料處理比較棘手,原來的資料填充和釋放只針對後台所有的資料,沒有把版本迭代後的狀態考慮進去,這裡的主要問題就是當使用者不重新整理頁面,還要解決後台傳輸的無效資料和有效資料的區分,不會在前台展現有效資料把無效...

mysql左右結合 結合左右加入mysql查詢

唯一可以做到的就是使用union.mysql不像mssql那樣支援full joinjust.select from tbl1 t1 left join tbl2 t2 on t1.col t2.col union select from tbl1 t1 right join tbl2 t2 on ...