Map related issues

<!--Load map start-->

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Document</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='http://59.110.157.48/map/assets/smartmapx.js'></script>
<link href='http://dev.smartmapx.com/map/assets/smartmapx.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; font-size: 10px;}
#map { position:absolute; top:0; bottom:0; width:100%; }

</style>
</head>
<body>

<div id='map'></div>


<script >
var map = new smartmapx.Map({
container: 'map',
style: 'http://dev.smartmapx.com/map/style.json',
center: [119.948098, 31.776411], //This property defines the center focus of the open map (this example is located in Changzhou, Jiangsu)
zoom: 10 //Map magnification
});

map.on('load',function(){
}) ;

</script>
</body>
</html>

<!--End of loading map-->

The above code can load a map.

map.on('click',function(e){
console.log(e.lngLat.lng+","+e.lngLat.lat)

}), this line of code realizes getting the coordinates of any position by clicking. Open the browser's console and switch to the console

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324903194&siteId=291194637