ThinkGeo.com    |     Documentation    |     Premium Support

Setting a Map to Full Screen

Hello,

I was working my way through the MVC quick start sample, and I was having some trouble setting the map size to be percentage based rather than a static pixel width/height. I tried doing the following:
Html.ThinkGeo().Map(“Map1”, new System.Web.UI.WebControls.Unit(100, System.Web.UI.WebControls.UnitType.Percentage), 570)

but this does not set the width to 100%. Additionally, if I try to set both height and width to 100%, the map does not appear at all and I am left with an empty asp.net screen. Any idea why this is occuring and what I could do to set a percentage based display size? Ideally, it would be similar to the http://maps.thinkgeo.com/ website where the map takes up the whole screen.

Thanks for any help you can provide.

Hi Daren,

If you view the source of http://maps.thinkgeo.com/ you can see it set all div which contains map to 100% like this:

And I think you can try to set that also, make sure all the containers have correct percent, then the map should works well.

Wish that’s helpful.

Regards,

Don

I’ve added all css shown in the example and still am unable to get a full screen map working. Can you provide a working example of a full screen, auto-resizing / responsive map?

Hi Jmarshall,

You can find most of our samples here:

Please refer them.

Wish that’s helpful.

Regards,

Ethan