liuhao-web

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
</head>

<body>
<script src="https://webapi.amap.com/maps?v=1.4.6&key=e163cbe37323c268a52d856b3acbfef"></script>
<script type="text/javascript">


AMap.plugin(\'AMap.Geocoder\', function() {
var geocoder = new AMap.Geocoder({
// city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode

})

geocoder.getLocation(\'山东省淄博市\', function(status, result) {
console.log(result)
if (status === \'complete\' && result.info === \'OK\') {
// result中对应详细地理坐标信息

}
})
})

 


</script>
</body>

</html>

分类:

技术点:

相关文章: