// // // // //鍦板浘瀹氫綅 var map = new AMap.Map('container',{ resizeEnable: true, zoom: 14, center: [113.787978,22.696069], }); var marker = new AMap.Marker({ position: [113.787978,22.696069] }); marker.setMap(map); marker.on('click',function(e){ infowindow.open(map,e.target.getPosition()); }) AMap.plugin('AMap.AdvancedInfoWindow',function(){ infowindow = new AMap.AdvancedInfoWindow({ content:'

娣卞湷甯傛柉搴疯揪鐢靛瓙鏈夐檺鍏徃

'+ '

鍦板潃锛氭繁鍦冲競瀹濆畨鍖虹娴疯閬撹幈绂忓伐涓氬洯B鏍婞/p>', offset: new AMap.Pixel(0, -30) }); infowindow.open(map,[113.787978,22.696069]); }); ///liteToolbar.js if (typeof map !== 'undefined') { map.on('complete', function() { if (location.href.indexOf('guide=1') !== -1) { map.setStatus({ scrollWheel: false }); if (location.href.indexOf('litebar=0') === -1) { map.plugin(["AMap.ToolBar"], function() { var options = { liteStyle: true } if (location.href.indexOf('litebar=1') !== -1) { options.position = 'LT'; options.offset = new AMap.Pixel(10, 40); } else if (location.href.indexOf('litebar=2') !== -1) { options.position = 'RT'; options.offset = new AMap.Pixel(20, 40); } else if (location.href.indexOf('litebar=3') !== -1) { options.position = 'LB'; } else if (location.href.indexOf('litebar=4') !== -1) { options.position = 'RB'; } map.addControl(new AMap.ToolBar(options)); }); } } }); }