var map = new AMap.Map('container', { resizeEnable: true, zoom: 10, center: [121.007127,31.741422] }); var marker = new AMap.Marker({ position: [121.007127,31.741422] }); marker.setMap(map); marker.on('click', function(e) { infowindow.open(map, e.target.getPosition()); }); var infowindow; infowindow = new AMap.InfoWindow({ content: '
张家港市贝尔德饮料机械有限公司
' + '江苏省张家港市锦丰沿江工业区27号
' + '热线电话:+86-512-58579028
', offset: new AMap.Pixel(0, -30) }); infowindow.open(map, [121.007127,31.741422]); // map.setLang('en'); AMapUI.loadUI(['control/BasicControl'], function(BasicControl) { //添加一个缩放控件 map.addControl(new BasicControl.Zoom({ position: 'rb' })); });