<div class="Map001372" data-role="part">
<div class="auto auto_1200">
<h1>Shun Fat Innovations Limited - Head Office</h1>
<div class="map">
<div id="mapcontent"></div>
</div>
<div class="clear"></div>
</div>
<script>
var map1 = new AMap.Map('mapcontent',{
resizeEnable: true,
rotateEnable:true,
dragEnable:true,
zoomEnable:true,
view: new AMap.View2D({
center: new AMap.LngLat(114.108888,22.552787),
zoom: 15
})
});
var marker1 = new AMap.Marker({
position: [114.108888,22.552787]
});
marker1.setMap(map1);
map1.setLang('en');
map1.setLang('cn');//中文版
//地图中添加地图操作ToolBar插件
map1.plugin(["AMap.ToolBar"],function() {
var toolBar1 = new AMap.ToolBar();
map1.addControl(toolBar1);
});
//鼠标点击marker弹出自定义的信息窗体
AMap.event.addListener(marker1, 'click', function() {
openInfo1()
});
//在指定位置打开信息窗体
function openInfo1(){
//构建信息窗体中显示的内容
var info1 = [];
info1.push("Room 803, 8th Floor, Hing Yip Commercial Centre, 272-284 Des Voeux Road Central, Hong Kong");
infoWindow1 = new AMap.InfoWindow({
content:info1.join("<br/>") //使用默认信息窗体框样式,显示信息内容
});
infoWindow1.open(map1, new AMap.LngLat(114.108888,22.552787));
}
//openInfo();
</script>
</div>
高德地图参数配置
最新推荐文章于 2024-06-07 20:59:53 发布