console
G7SMap.init({
id: 'map',
key: {
'bmap': 'ebAmxZxmn8hHBm1anhEcTH8j',
'gmap': 'AIzaSyBdZt3pUFIFTWKlHqUA_m6GJo_V--k84KU'
}
}).then(function (map) {
var point= new G7SMap.Point(115, 40);
var sw = new G7SMap.Point(114, 39);
var ne = new G7SMap.Point(116, 41);
var bounds = new G7SMap.Bounds(sw, ne);
var sw1 = new G7SMap.Point(114.5, 39.5);
var ne1 = new G7SMap.Point(115.5, 40.5);
var bounds1 = new G7SMap.Bounds(sw1, ne1);
console.info('bounds中心点', bounds.getCenter());
console.info('bounds西南点', bounds.getSouthWest());
console.info('bounds东北点', bounds.getNorthEast());
console.info('bounds与bounds1是否相等', bounds.equals(bounds1));
console.info('point是否在bounds内', bounds.containsPoint(point));
console.info('bounds1是否完全在bounds中', bounds.containsBounds(bounds1));
console.info('bounds是否为空', bounds.isEmpty());
});
<div id="map" class="map"></div>
.map {
max-width: 800px;
height: 500px;
}