<!DOCTYPE html>
<html>
<head>
<title>谷歌2019卫星Google高清地图</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
overflow: hidden;
}
</style>
<link href="css/leaflet.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/leaflet.js"></script>
<script type="text/javascript" src="js/include.js"></script>
<script type="text/javascript" src="js/MovingMarker.js"></script>
</head>
<body>
<div id="map" style="width:100%;height:700px;margin-bottom:10px;">地图正在载入...</div>
<!-- 300x250, 10 -->
<script type="text/javascript">
load();
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-62195-20');
//坐标定位
map.flyTo([37.91001950286145, 113.0685931540321]);
//标点
var a = new (L.Icon.extend({
options: {
iconSize: [24, 24]
}
}))({
iconUrl: "images/01.png"
});
crossm = L.marker([y, x], {
icon: a
});
crossm.addTo(map);
// var marker = L.marker([37.91001950286145, 113.0685931540321]).addTo(map);
crossm.bindPopup("I am a circle.");
//画圈
var circle = L.circle([37.91001950286145, 113.0685931540321], {
color: 'red',
fillColor: '#f03',
fillOpacity: 0.5,
radius: 500
}).addTo(map);
circle.bindPopup("I am a circle.");
//添加多边形
//,,,,,,,,37.87501631089576, 113.2922397514036,37.88530776162611, 113.29978850387727
//var polygon = L.polygon([
// [37.914819988174095, 113.24042784466167],
// [37.89180688191733, 113.23665347366352],
// [37.8771830519312, 113.2445453445822],
// [37.88557856963964, 113.26376037040484],
// [37.90913506661244, 113.25552536532507],
// [37.914278588361526, 113.26478975193334],
// [37.90751072350826, 113.28434787524623],
// [37.88828659551637, 113.27714225693364]
//]).addTo(map);
//polygon.bindPopup("I am a polygon.");
//画线
//var arrow = L.polyline([[
// [37.914819988174095, 113.24042784466167],
// [37.89180688191733, 113.23665347366352],
// [37.8771830519312, 113.2445453445822],
// [37.88557856963964, 113.26376037040484],
// [37.90913506661244, 113.25552536532507],
// [37.914278588361526, 113.26478975193334],
// [37.90751072350826, 113.28434787524623],
// [37.88828659551637, 113.27714225693364]
//]], { opacity: 1, color: 'firebrick' }).bindPopup('I am red:').addTo(map);
//轨迹
var londonParisRomeBerlinBucarest = [
[37.914819988174095, 113.24042784466167],
[37.89180688191733, 113.23665347366352],
[37.8771830519312, 113.2445453445822],
[37.88557856963964, 113.26376037040484],
[37.90913506661244, 113.25552536532507],
[37.914278588361526, 113.26478975193334],
[37.90751072350826, 113.28434787524623],
[37.88828659551637, 113.27714225693364]
];
var marker2 = L.Marker.movingMarker(londonParisRomeBerlinBucarest,
[3000, 3000, 3000, 3000, 3000, 3000], { autostart: true }).addTo(map);
L.polyline(londonParisRomeBerlinBucarest, { color: 'red' }).addTo(map);
console.log(marker2);
marker2.on('end', function () {
marker2.bindPopup('<b>Welcome to Bucarest !</b>', { closeOnClick: false })
.openPopup();
});
</script>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
谷歌地图.zip (17个子文件)
谷歌地图
www.gugeditu.net
css
leaflet.css 14KB
.vs
www.gugeditu.net
config
applicationhost.config 76KB
v16
.suo 21KB
VSWorkspaceState.json 151B
slnx.sqlite 88KB
default.html 4KB
images
marker-icon-2x.png 2KB
01.png 3KB
db.png 5KB
marker-icon.png 1KB
layers.png 696B
layers-2x.png 1KB
marker-shadow.png 618B
js
include.js 2KB
leaflet.js 285KB
MovingMarker.js 9KB
script.js 4KB
共 17 条
- 1
资源评论
平凡程序猿
- 粉丝: 272
- 资源: 16
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功