To achieve this, click the Qingdao or Xiamen buttons to transfer to the coordinate point location of Qingdao (or the corresponding)
Currently, the initial map center point is set to Xinjiang
This is how to initialize the map
$(".btn-Qing").on('click', function () {
// 百度地图API功能
map = new BMap.Map("map-container", { minZoom: 5, maxZoom: 10 });
var initPoint1 = new BMap.Point(120.369461, 36.118473);
map.centerAndZoom(initPoint1, 8);
map.addOverlay(initPoint1)
InitBMap();
})
This is what I wrote simply, but when I add that method at the end, there is no way to transfer it to Qingdao. Can anyone teach me how to do it?
map.setCenter(new BMap.Point(116.304, 39.915))