需要帮助...我找到了一个旋转地球仪的示例,旋转后我无法放大到特定国家/地区。
我在下面使用此示例
https://codepen.io/ghizlene_ghizlene/pen/WWgzrp
我还尝试使用下面提到的代码更改视图,
var map = new maptalks.Map('map', {
center: [13.0827, 80.2707],
zoom: 8,
baseLayer: new maptalks.TileLayer('base', {
urlTemplate: 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png',
subdomains: ['a', 'b', 'c', 'd'],
attribution: '© <a href="http://osm.org">OpenStreetMap</a> contributors, © <a href="https://carto.com/">CARTO</a> '
})
});
function changeView() {
map.animateTo({
center: [13.0827, 80.2707],
zoom: 10,
pitch: 0,
bearing: 20
}, {
duration: 5000
});
setTimeout(function() {
map.animateTo({
center: [13.0827, 80.2707],
zoom: 3,
pitch: 65,
bearing: 360
}, {
duration: 7000
});
}, 7000);
}