SOURCE

console 命令行工具 X clear

                    
>
console
G7SMap.init({
    id: 'map',
    key: {
        'bmap': 'ebAmxZxmn8hHBm1anhEcTH8j',
      	'gmap': 'AIzaSyBdZt3pUFIFTWKlHqUA_m6GJo_V--k84KU'
    }
}).then(function (map) {
  	// map即为初始化完成的 G7SMap 地图实例对象
    
  	var ac = new G7SMap.Autocomplete({ input: 'auto-ipt' });
  
  	ac.addEvent('onselect', function (e) {
      	var point = e.point;
        var marker = new G7SMap.Marker(point);
      
        map.clearOverlays();
        map.addOverlay(marker);
        map.setZoomAndCenter(point,12);
    });
});
<div id="map" class="map"></div>
<div style="margin-top: 10px;">
    <input id="auto-ipt" type="text" />
</div>

.map {
  max-width: 800px;
  height: 500px;
}

本项目引用的自定义外部资源