jmelosegui / GooglemapMvc

The control wraps Google maps API simplifying the use of Google maps in ASP.NET MVC applications.
MIT License
116 stars 61 forks source link

Mapping Section Not Fitting Container #72

Closed si-wattsy closed 9 years ago

si-wattsy commented 9 years ago

Hello,

I am playing about with this control, which is great by the way.

In my project I am having an issue when using the control and that the interactable part of the control (ie the actual map) is around 200px wide where as the whole map container is set to width and height 0 and correctly fits the page. The result is a large grey space where the map should be, the Map/Satellite toggle does fill the page correctly and appears over on the right hand side of the container. When I inspect element on the page the interactable part of the control changes to fill the page correctly.

Incidentally I have an hidden container on the left hand side of the main content that the map control is included in that is the same size that the map generates, so i suspect the map is being sized off this in some way rather than the container that it is included in. However, the problem persists if i remove the hidden left panel from my project. I am also using the DevExpress controls in this project.

I have been testing in Chrome Verion 45.0.2454.93 m and Maxthon 4.4.7.100 to reproduce the problem.

It is not an issue using IE 11.0.102.40.16431 - which I guess implies that there is a specific issue in my project but I thought it was worth raising anyway. I will update should I find out anything new.

Here is a screenshot: http://imgur.com/psFJRAB

Regards,

Simon

si-wattsy commented 9 years ago

While investigating this I have noticed that this occurs when the div that the map is sitting in has it's width set in terms of % rather than in absolute pixels. When using absolute pixels the map is the expected size.

Thanks

Simon

jmelosegui commented 9 years ago

Thanks for your feedback!!!!