openlayers知识点
-
动画移动
map1.getView().animate({center: center}, {zoom: 18}) // 先移动再放大
map1.getView().animate({zoom: 18}, {center: center}) // 先放大再移动
map1.getView().animate({center: center, zoom: 18}) // 同时移动和放大
原文链接:https://blog.csdn.net/envon123/article/details/83306070 -
清除openlayers默认控件
controls: ol.control.defaults({
attributionOptions: ({
collapsible: false
}),
//清除地图上默认样式(放大、缩小、旋转按钮等)
attribution: false,
rotate: false,
zoom: false
})