Josh-ES / react-here-maps

React.js HERE Maps component
MIT License
35 stars 25 forks source link

Resizing is not working when interactive #8

Closed nirgur closed 7 years ago

nirgur commented 7 years ago

When interactive=true the map is not resizing upon window resize event. In order to fix it - as a temporary solution, i did the following:

ref={ map => { let resize = () => map.getMap().getViewPort().resize(); map && map.getMap() && window.addEventListener('resize', setTimeout(resize ,200), { once: true }); }}