首页 / 浏览问题 / WebGIS / 问题详情
openlayers重新渲染整个地图的方法是什么?
35EXP 2020年07月02日
iclient for openlayers重新渲染地图的方法是什么?对整个map不是单独的layer

1个回答

map只是容器,map的更新是针对与map绑定的div的size而言,而非map里面的layer。如果您那边因为div的变化而让其layer显示拉虚,可以使用

map的方法

updateSize() inherited

PluggableMap.jsline 1327

Force a recalculation of the map viewport size. This should be called when third-party code changes the size of the map viewport.

3,352EXP 2020年07月03日
你这个方法是改变div的大小让map重新渲染?但是之前classic就有render()的方法。ol有没有类似render()的方法呢,直接执行某一个方法就让地图重新渲染
...