|
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>APP</title>
<link rel="stylesheet" type="text/css" href="../css/api.css" />
<link rel="stylesheet" type="text/css" href="../css/common.css" />
<style>
#con{
margin:10px;
font-size: 28px;
}
ul{
margin-bottom:10px;
}
.txt{
margin:5px 10px;
padding:5px;
color:#000;
word-wrap: break-word;
}
</style>
</head>
<body>
<label id="con">Hello APP</label>
<div id='sys-info'></div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
apiready = function(){
var map=api.require('bMap');
map.open({
rect:{
x:0,
y:0,
w:api.frameWidth,
h:api.frameHeight
},
showUserLocation:true,
zoomLevel:18,
fixedOn:'',
fixed:true
}, function(ret){
if(ret.status){
alert('地图打开成功');
}
});
map.setScaleBar({
show: true,
position: {
x:0,
y:api.frameHeight
}
});
map.getLocation(
{accuracy:'10m',
filter:1,
autoStop:false
},function(ret,err){
var sta=ret.status;
var lng=ret.lon;
var lat=ret.lat;
var t=ret.timestamp;
if(sta){
map.setCenter({coords:{lon:lng,lat:lat},animation:true});
}
else{}});
map.showUserLocation({
isShow: true,
trackingMode: 'none'
});
map.addBillboard({
id: 4,
coords: {
lon:119.320707,
lat:26.033853
},
bgImg: 'widget://image/3.jpg',
content: {
title: '大标题大标题大标题大标题',
subTitle: '概述内容概述内容概述内容',
illus:'widget://image/3.jpg'
},
styles: {
titleColor: '#000',
titleSize: 16,
subTitleColor: '#999',
subTitleSize: 12,
illusAlign: 'left'
}
}, function(ret){
var obj = api.require('imageBrowser');
obj.openImages({
imageUrls: ['widget://image/3.jpg'],
showList:true,
activeIndex:1
});
});
map.setMapAttr({
type:'satelite'
});
};
</script>
</html>
为什么显示不了卫星地图,哪里错了啊
|
|