I created a project to use a Leaflet map. The project has navbar and a sidebar. The sidebar's height is higher than the map. When the map loads how can I give dynamic height to the sidebar and the map? Example is here
Asked
Active
Viewed 155 times
0
-
I do not understand what you want to achieve. What does it mean give dynamic height to the map and the sidebar? Can you explain? – kboul Dec 14 '18 at 09:06
-
The map and the sidebar must be fit on the screen. The scroll must not be appear – Hermes Dec 14 '18 at 10:10
-
Therefore, you want to resize the map container so that a scrollbar does not appear depending on the screen size. Is that correct? – kboul Dec 14 '18 at 10:15
-
Yes, you are right. I want to resize the map and the sidebar when page load and window resize. – Hermes Dec 14 '18 at 10:25
-
Do you have any idea? – Hermes Dec 14 '18 at 11:56
-
Take a look [here](https://stackoverflow.com/questions/24412325/resizing-a-leaflet-map-on-container-resize) as a starting point. I am not sure how to achieve this behavior regarding the map right now. I will take a look later when I find some time. – kboul Dec 14 '18 at 12:08
-
Thanks. Before I used that method on AngularJS but it is Angular 5. If I give a height to the container it will solve. – Hermes Dec 14 '18 at 12:14