高效、快速开发室内外地图(gis)定位平台

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://211.136.131.242:8087/api/map.js?key=您的密钥"></script>
<title>图片标注</title>
<style type="text/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;}
</style>




</head>
<body>


<div id="div_map" style="width:100%;height:100%;"></div>


<script type="text/javascript">
var map=null; 


map=new STMapObj("div_map"); 
map.locateMap(new STMapPoint(121.476324,31.22717),3); 
LocationPoint();




function LocationPoint(){   


var poly = new  STMapMarker();


poly.id="testline6";  //【必选】对象 id
poly.point=new STMapPoint(121.47727877909848,31.227720161691113);  //【必选】经纬度坐标  STMapPoint 类型
poly.img="../img/carAPI.png";  //【必选】对象的图片地址 url
poly.label="";  //【可选】鼠标提示
poly.size=""  //【可选】图片长宽 参数为 STMapSize 类型,默认为图片本身尺寸
poly.anchor="TR" // 【可选】定位锚点,BC (下边中心点)BL (左下角)BR (右下角)TL (左上角)TC (上边中心点)TR (右上角)ML (左边中心点)MR (右边中心点)CENTER (图片中心点)


poly.infowin=true;  //【可选】是否点击显示信息窗口,默认为 true。
poly.title="";  //属性信息库标题,支持 html 代码
poly.content="我是的添加的图片";  //属性信息框内容,支持 html 代码
poly.moveable  = false;  //是否可以拖动
map.addOverlay(poly); 
}



</script>
<div style="display: none">
<script type="text/javascript">
var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cspan id='cnzz_stat_icon_1000501913'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s11.cnzz.com/z_stat.php%3Fid%3D1000501913' type='text/javascript'%3E%3C/script%3E"));
</script>
</div>
</body>

</html>


                                                                                                                                                                                               运行查看效果


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值