hi-ucs/front/public/leaflet/libs/iclient8c/resource/Android/html/shotscreen.html

41 lines
1.3 KiB
HTML
Raw Normal View History

2022-06-14 09:32:49 +08:00
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>SuperMap iClient for JavaScript</title>
<style>
#map{
border:0px solid;
}
</style>
<script type="text/javascript" src="js/cordova-2.7.0.js"></script>
<script src="libs/SuperMap.Include.js"></script>
<script src="js/ShotScreenControl.js"></script>
<script type="text/javascript">
var map, layer,markerLayer,shotScreenCtl;
function init() {
SuperMap.Util.setApp(true);
map = new SuperMap.Map("map",{controls: [
new SuperMap.Control.ScaleLine(),
new SuperMap.Control.Zoom(),
new SuperMap.Control.Navigation({dragPanOptions: {enableKinetic: true}})
]
});
layer = new SuperMap.Layer.CloudLayer();
map.addLayers([layer]);
map.setCenter(new SuperMap.LonLat(11615044.272732, 4422334.5114479), 4);
}
function shot(){
if(!shotScreenCtl){
shotScreenCtl = new SuperMap.ShotScreenControl();
}
shotScreenCtl.shot();
}
document.addEventListener("deviceready",init,false);
</script>
</head>
<body>
<div id="map" style="position:absolute;left:0px;right:0px;width:100%;height:100%;"></div>
<input id="button" style="position:absolute;right:5px;top:5px;z-index:999" value="截屏" type="button" ontouchend="shot()"></input>
</body>
</html>