运行代码效果(GIS地图地址解析)
tml>
<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.778885,31.049919),5);
map.setZoomCompVisible(false);
map.setScaleCompVisible(false);
geocode();
//地理编码
function geocode()
{
map.geoCoding("上海市钦州南路81号",geofunc);
}
function geofunc(x,y)
{
alert(x+","+y)
}
</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>
运行代码效果(GIS地图地址解析)