<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>新昌乡镇</title>
<!-- <script type="text/javascript" src="http://gis.kf315.net/api/mapbox.js"></script> -->
<script type="text/javascript" src="//ccy.zjxc.gov.cn/gis/api/mapbox.js"></script>
<script type="text/javascript" src="../xinchang.js"></script>
<!-- <script src="./FileSave.js"></script> -->
<style>
#container {
position: absolute;
padding: 0;
width: 100%;
height: 100%;
}
</style>
</head>
<body onload="bodyLoad()">
<div id="container"></div>
<!-- <button onclick="showchayuan()" style="height: auto;width: auto;position:relative;">茶园</button>
<button onclick="showzhuti()" style="height: auto;width: auto;position: relative;">主体</button>
<button onclick="showwulianwang()" style="height: auto;width: auto;position: relative;">物联网</button> -->
<script type="text/javascript">
var map;
var timer;
var t = -1;
var extent = [
[120.6937822, 29.294418],
[121.2272529, 29.6200733]
];
var Point = {
type: 'FeatureCollection',
features: []
}
var centroid_point = {
type: 'FeatureCollection',
features: []
};
var insurance_centroid_point = {
type: 'FeatureCollection',
features: []
};
var iot_centroid_point = {
type: 'FeatureCollection',
features: []
};
var video_centroid_point = {
type: 'FeatureCollection',
features: []
};
var init_centroid_point = {
type: 'FeatureCollection',
features: []
};
var activeIndex = 0;
var filter = [
"all",
["!=", ["get", "category_code"], ""],
["!=", ["get", "category_code"], ""],
["!=", ["get", "category_code"], ""],
["!=", ["get", "category_code"], ""],
["!=", ["get", "category_code"], ""],
["!=", ["get", "category_code"], ""],
["!=", ["get", "category_code"], ""],
["!=", ["get", "category_code"], ""],
];
var filter_org_type = [
"all",
["!=", ["get", "type"], ""],
["!=", ["get", "type"], ""],
["!=", ["get", "type"], ""]
];
function bodyLoad() {
map = new EMap('container', {
zoom: 10,
style: 'Binjiang',
center: [120.966, 29.4622],
config: 'none',
sprite: 'fagaiwei'
});
map.addEventListener(EMap.Events.onMapLoaded, function () {
map.fitBounds(extent, 280, 0, true);
map.loadImage('qixiang', './img/qixiang.png', () => { });
map.loadImage('zhuti', '../supervision/img/zhuti.png', () => { });
map.loadImage('shengchan', './img/shengchan.png', () => { });
map.loadImage('jingying', './img/jingying.png', () => { });
map.loadImage('zhizao', './img/zhizao.png', () => { });
map.loadImage('jiankong', './img/jiankong.png', () => { });
map.loadImage('chaji', './img/chaji.png', () => { });
map.loadImage('chongqing', './img/chongqing.png', () => { });
map.loadImage('fuyang', './img/fuyang.png', () => { });
map.loadImage('huanjing', './img/huanjing.png', () => { });
map.loadImage('turang', './img/turang.png', () => { });
map.loadImage('wuren', './img/wuren.png', () => { });
map.loadImage('insurance', './img/insurance.png', () => { });
map.loadImage('chaye', '../img/chaye.png', () => { });
addLayer();
addPanLayer();
window.parent.postMessage({ // 地图加载完成
type: 'loadFinish'
}, '*')
// playChaYuan(centroid_point);
});
map.addEventListener(EMap.Events.onMapClick, function (e) {
Point.features.push({
type: 'Feature',
geometry: {
type: 'Point',
coordinates: [e.lngLat.lng, e.lngLat.lat]
},
properties: { 'type': '农庄' }
})
});
map.addEventListener(EMap.Events.onFeatureMouseout, function (e) {
clearInterval(timer);
if (e.id === 'chaye') {
window.parent.postMessage({ //参数是对象
type: 'delPopup'
}, '*')
// playChaYuan(centroid_point);
} else if (e.id === 'zhuti') {
// playZhuTi(centroid_point);
} else if (e.id === 'wulianwang' || e.id === 'iot') {
// playWuLianWang(iot_centroid_point);
}
})
map.addEventListener(EMap.Events.onFeatureMouseover, function (e) {
t = -1;
clearInterval(timer);
// map.destroyInfoSymbol();
const coordinates = map.mapPoint2ScreenPoint(e.features[0].geometry.coordinates);
window.parent.postMessage({ //参数是对象
getMapChooseData: {
// ...feature,
coordinates,
properties: e.features[0].properties
},
index: activeIndex,
type: 'addPopup'
}, '*')
});
map.addEventListener(EMap.Events.onFeatureClick, function (e) {
t = -1;
clearInterval(timer);
// window.parent.postMessage({ //参数是对象
// type: 'delPopup'
// }, '*')
// // map.destroyInfoSymbol();
// const coordinates = map.mapPoint2ScreenPoint(e.coordinates);
// window.parent.postMessage({ //参数是对象
// getMapChooseData: {
// // ...feature,
// coordinates,
// properties: e.properties
// },
// index: activeIndex,
// type: 'addPopup'
// }, '*')
});
}
//茶园轮播
function playChaYuan(data) {
timer = setInterval(() => {
if (t === data.features.length) t = 0;
else t++;
for (var i = 0; i < data.features.length; i++) {
if (t === i) {
map.destroyInfoSymbol();
const coordinates = map.mapPoint2ScreenPoint(data.features[i].geometry.coordinates);
window.parent.postMessage({ //参数是对象
getMapChooseData: {
// ...feature,
coordinates,
properties: data.features[i].properties
},
index: activeIndex,
type: 'addPopup'
}, '*')
}
}
}, 3000);
}
//主体轮播
function playZhuTi(data) {
timer = setInterval(function () {
if (t === data.features.length) t = 0;
else t++;
for (var i = 0; i < data.features.length; i++) {
if (t === i) {
// map.destroyInfoSymbol();
const coordinates = map.mapPoint2ScreenPoint(data.features[i].geometry.coordinates);
window.parent.postMessage({ //参数是对象
getMapChooseData: {
// ...feature,
coordinates,
properties: data.features[i].properties
},
index: activeIndex,
type: 'addPopup'
}, '*')
}
}
}, 3000);
}
//物联网轮播
function playWuLianWang(data) {
timer = setInterval(function () {
if (t === data.features.length) t = 0;
else t++;
for (var i = 0; i < data.features.length; i++) {
if (t === i) {
// map.destroyInfoSymbol();
const coordinates = map.mapPoint2ScreenPoint(data.features[i].geometry.coordinates);
window.parent.postMessage({ //参数是对象
getMapChooseData: {
// ...feature,
coordinates,
properties: data.features[i].properties
},
index: activeIndex,
type: 'addPopup'
}, '*')
}
}
}, 3000);
}
//�
没有合适的资源?快使用搜索试试~ 我知道了~
react模板 初始化模板 工程简单模板
共875个文件
png:439个
js:259个
less:148个
0 下载量 162 浏览量
2022-10-24
10:43:09
上传
评论
收藏 5.22MB RAR 举报
温馨提示
react模板 初始化模板 工程简单模板
资源详情
资源评论
资源推荐
收起资源包目录
react模板 初始化模板 工程简单模板 (875个子文件)
video-js.css 46KB
base.css 2KB
App.css 602B
index.css 413B
index.css 0B
.gitignore 333B
index1.html 22KB
index.html 21KB
index.html 19KB
xinchang.html 18KB
index.html 17KB
index1.html 16KB
tea.html 15KB
iot.html 13KB
index.html 12KB
pest.html 11KB
index1.html 11KB
devPredict.html 10KB
index.html 8KB
index.html 4KB
bg.jpg 47KB
xinchang.js 777KB
video.min.js 507KB
pointIsInSurface.js 37KB
webpack.config.js 35KB
index.js 28KB
index.js 23KB
index.js 12KB
index.js 11KB
index.js 11KB
index.js 9KB
index.js 9KB
api.js 9KB
index.js 9KB
ajax.js 8KB
map.js 7KB
index.js 7KB
weather.js 7KB
index.js 7KB
webpackDevServer.config.js 7KB
index.js 7KB
build.js 7KB
index.js 6KB
common.js 6KB
index.js 6KB
index.js 6KB
index.js 6KB
index.js 5KB
index.js 5KB
index.js 5KB
start.js 5KB
index.js 5KB
index.js 5KB
map.js 5KB
index.js 5KB
index.js 5KB
bar.js 5KB
bar.js 5KB
index.js 5KB
t1.js 5KB
bar1.js 5KB
index.js 5KB
index.js 5KB
line2.js 5KB
index.js 5KB
index.js 5KB
index.js 5KB
bar3.js 5KB
index.js 5KB
index.js 5KB
pie.js 4KB
pie.js 4KB
line1.js 4KB
index.js 4KB
index.js 4KB
env.js 4KB
index.js 4KB
index.js 4KB
bar2.js 4KB
index.js 4KB
index.js 4KB
index.js 4KB
index.js 4KB
modules.js 4KB
code.js 4KB
twoLOneB.js 4KB
t2.js 3KB
trace.js 3KB
trace.js 3KB
credit.js 3KB
t3.js 3KB
index.js 3KB
t1.js 3KB
inPage.js 3KB
index.js 3KB
App.js 3KB
Paging.js 3KB
index.js 3KB
bar4.js 3KB
breeding.js 3KB
共 875 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
小菜鸟学代码··
- 粉丝: 1w+
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0