document.write('<script src="../js/bigDataMap_service.js"></script>');
|
|
//三维警力热力图
|
var policeHeatmap;//警力(目前只有警车)分布热力图
|
function policeHeatmapLoad(data){
|
var heatmapBounds = {
|
west: 126.463620,
|
south: 45.562140,
|
east: 126.810380,
|
north: 45.878300
|
};
|
policeHeatmap = CesiumHeatmap.create(
|
viewer, // your cesium viewer
|
heatmapBounds, // bounds for heatmap layer
|
{
|
// heatmap.js options go here
|
// maxOpacity: 0.3
|
}
|
);
|
var policeHeatmapData = [];
|
for ( var i = 0; i < data.length; i++) {
|
policeHeatmapData.push({
|
"x": Number(data[i].longitude),
|
"y": Number(data[i].latitude),
|
"value": 1.0
|
});
|
}
|
policeHeatmap.setWGS84Data(0,1000,policeHeatmapData);
|
}
|
//三维案件热力图
|
var caseHeatmap;//案件分布热力图
|
function caseHeatmapLoad(data){
|
var heatmapBounds = {
|
west: 129.79745505408324,
|
south: 42.932972285934720,
|
east: 129.87297132055263,
|
north: 43.011860517177220
|
};
|
caseHeatmap = CesiumHeatmap.create(
|
viewer, // your cesium viewer
|
heatmapBounds, // bounds for heatmap layer
|
{
|
// heatmap.js options go here
|
// maxOpacity: 0.3
|
}
|
);
|
var caseHeatmapData = [];
|
for ( var i = 0; i < data.length; i++) {
|
var poiArr = data[i].case_position.split(",");
|
caseHeatmapData.push({
|
"x": Number(poiArr[0]),
|
"y": Number(poiArr[1]),
|
"value": 850.0
|
});
|
}
|
caseHeatmap.setWGS84Data(0,1000,caseHeatmapData);
|
}
|
//三维常住人口热力图
|
var peopleHeatmap;//人口分布热力图
|
function peopleHeatmapLoad(data){
|
var heatmapBounds = {
|
west: 129.79745505408324,
|
south: 42.932972285934720,
|
east: 129.87297132055263,
|
north: 43.011860517177220
|
};
|
peopleHeatmap = CesiumHeatmap.create(
|
viewer, // your cesium viewer
|
heatmapBounds, // bounds for heatmap layer
|
{
|
// heatmap.js options go here
|
// maxOpacity: 0.3
|
}
|
);
|
var peopleHeatmapData = [];
|
for ( var i = 0; i < data.length; i++) {
|
var poiArr = data[i].poi.split(",");
|
peopleHeatmapData.push({
|
"x": Number(poiArr[0]),
|
"y": Number(poiArr[1]),
|
"value": 850.0
|
});
|
}
|
peopleHeatmap.setWGS84Data(0,1000,peopleHeatmapData);
|
}
|
//三维重点人口热力图
|
var keyPeopleHeatmap;
|
function keyPeopleHeatmapLoad(data){
|
var heatmapBounds = {
|
west: 129.79745505408324,
|
south: 42.932972285934720,
|
east: 129.87297132055263,
|
north: 43.011860517177220
|
};
|
keyPeopleHeatmap = CesiumHeatmap.create(
|
viewer, // your cesium viewer
|
heatmapBounds, // bounds for heatmap layer
|
{
|
// heatmap.js options go here
|
// maxOpacity: 0.3
|
}
|
);
|
var keyPeopleHeatmapData = [];
|
for ( var i = 0; i < data.length; i++) {
|
var poiArr = data[i].poi.split(",");
|
keyPeopleHeatmapData.push({
|
"x": Number(poiArr[0]),
|
"y": Number(poiArr[1]),
|
"value": 850.0
|
});
|
}
|
keyPeopleHeatmap.setWGS84Data(0,1000,keyPeopleHeatmapData);
|
}
|
//三维流动人口热力图
|
var flowPeopleHeatmap;
|
function flowPeopleHeatmapLoad(data){
|
var heatmapBounds = {
|
west: 129.79745505408324,
|
south: 42.932972285934720,
|
east: 129.87297132055263,
|
north: 43.011860517177220
|
};
|
flowPeopleHeatmap = CesiumHeatmap.create(
|
viewer, // your cesium viewer
|
heatmapBounds, // bounds for heatmap layer
|
{
|
// heatmap.js options go here
|
// maxOpacity: 0.3
|
}
|
);
|
var flowPeopleHeatmapData = [];
|
for ( var i = 0; i < data.length; i++) {
|
var poiArr = data[i].poi.split(",");
|
flowPeopleHeatmapData.push({
|
"x": Number(poiArr[0]),
|
"y": Number(poiArr[1]),
|
"value": 850.0
|
});
|
}
|
flowPeopleHeatmap.setWGS84Data(0,1000,flowPeopleHeatmapData);
|
}
|
//三维巡逻来源流向分析
|
var policeodline;
|
function showpoliceLines(data) {
|
/*var odOption = {
|
viewer: viewer,
|
geoJsonUrl: '../../easy3dfile/data/map/busLines.json',
|
linecolor: Cesium.Color.GOLD,//ORANGE;//ORANGE;//GOLD;//底线颜色
|
linewidth: 8.0,//底线宽度
|
lineglow: 0.15,//底线光晕宽度
|
tracecolor: Cesium.Color.WHITE,//ORANGE;//GOLD;//尾迹线颜色
|
tracewidth: 28.0,//尾迹线宽度
|
positions: points,//坐标点数组
|
timeDuration: 3.0,//各个尾迹线发出的时间间隔
|
moveBaseDuration: 3.0,//各个尾迹线的速度,数值越大越慢
|
};
|
policeodline = CesiumODline.loadGeoJson(odOption);*/
|
|
var points = [];
|
for (var i = 0; i < data.length; i++) {
|
var lPoylineArr = data[i].lPoyline.split(',');
|
var tmppoints = [];
|
for ( var j = 0; j < lPoylineArr.length; j=j+3) {
|
var cart = Cesium.Cartesian3.fromDegrees(Number(lPoylineArr[j]),
|
Number(lPoylineArr[j+1]),Number(lPoylineArr[j+2]+30));
|
tmppoints.push(cart);
|
}
|
points.push(tmppoints);
|
}
|
|
var odOption = {
|
viewer: viewer,
|
linecolor: Cesium.Color.ORANGE,//ORANGE;//ORANGE;//GOLD;//底线颜色
|
linewidth: 8.0,//底线宽度
|
lineglow: 0.15,//底线光晕宽度
|
tracecolor: Cesium.Color.WHITE,//ORANGE;//GOLD;//尾迹线颜色
|
tracewidth: 28.0,//尾迹线宽度
|
positions: points,//坐标点数组
|
timeDuration: 3.0,//各个尾迹线发出的时间间隔
|
moveBaseDuration: 3.0,//各个尾迹线的速度,数值越大越慢
|
};
|
policeodline = CesiumODline.add(odOption);
|
}
|
function closepoliceLines() {
|
CesiumODline.remove(viewer,policeodline);
|
}
|
//重点单位分布热力图
|
var keydepHeatmap;
|
function keydepHeatmapLoad(data){
|
var heatmapBounds = {
|
west: 129.79745505408324,
|
south: 42.932972285934720,
|
east: 129.87297132055263,
|
north: 43.011860517177220
|
};
|
keydepHeatmap = CesiumHeatmap.create(
|
viewer, // your cesium viewer
|
heatmapBounds, // bounds for heatmap layer
|
{
|
// heatmap.js options go here
|
// maxOpacity: 0.3
|
}
|
);
|
var keydepHeatmapData = [];
|
for ( var i = 0; i < data.length; i++) {
|
var poiArr = data[i].poi.split(",");
|
keydepHeatmapData.push({
|
"x": Number(poiArr[0]),
|
"y": Number(poiArr[1]),
|
"value": 850.0
|
});
|
}
|
keydepHeatmap.setWGS84Data(0,1000,keydepHeatmapData);
|
}
|
//商业场所分布热力图
|
var businessHeatmap;
|
function businessHeatmapLoad(data){
|
var heatmapBounds = {
|
west: 129.79745505408324,
|
south: 42.932972285934720,
|
east: 129.87297132055263,
|
north: 43.011860517177220
|
};
|
businessHeatmap = CesiumHeatmap.create(
|
viewer, // your cesium viewer
|
heatmapBounds, // bounds for heatmap layer
|
{
|
// heatmap.js options go here
|
// maxOpacity: 0.3
|
}
|
);
|
var businessHeatmapData = [];
|
for ( var i = 0; i < data.length; i++) {
|
var poiArr = data[i].poi.split(",");
|
businessHeatmapData.push({
|
"x": Number(poiArr[0]),
|
"y": Number(poiArr[1]),
|
"value": 850.0
|
});
|
}
|
businessHeatmap.setWGS84Data(0,1000,businessHeatmapData);
|
}
|
//大数据统计分析灰模效果
|
var stcfilmArr = [];
|
function showStcmap(){
|
for (var i = 0; i < bigDataOverlay.length; i++) {
|
stcfilmArr.push(viewer.entities.add({
|
polygon : {
|
hierarchy : new Cesium.PolygonHierarchy(
|
Cesium.Cartesian3.fromDegreesArrayHeights(bigDataOverlay[i])),
|
material : new Cesium.Color(2/255, 25/255, 48/255, 1),//Cesium.Color.MIDNIGHTBLUE,//MOCCASIN,//NAVY,//LINEN,
|
classificationType : Cesium.ClassificationType.BOTH
|
}
|
}));
|
}
|
viewer.imageryLayers.remove(tdtannoimagery,false);
|
viewer.imageryLayers.remove(googleimagery,false);
|
viewer.imageryLayers.remove(tdtvectorimagery,false);
|
viewer.imageryLayers.remove(tdtvectoranoimagery,false);
|
viewer.imageryLayers.add(localimagery);
|
}
|
function closeStcmap(){
|
for (var i = 0; i < stcfilmArr.length; i++) {
|
viewer.entities.remove(stcfilmArr[i]);
|
}
|
viewer.imageryLayers.remove(localimagery,false);
|
viewer.imageryLayers.add(tdtannoimagery);
|
viewer.imageryLayers.add(googleimagery);
|
}
|