This project has moved. For the latest updates, please go here.

Dynamic Map Size

Aug 14, 2009 at 7:34 PM

I'm attempting to set the Height and Width properties of the SharpMap.Web.UI.Ajax.AjaxMapXControl object to 100%.  This works fine with width but not at all with Height.  I tried tracing the code back to where it converts the width from 100% to pixels but was unsuccessful.  I was just wondering if someone could point me to the correct class that I need to be looking in or a work around that would be great.  I tried searching the forums but did not find anything like this.

I am using Sharp Map V.9 from the trunk.



Rob Jones

Aug 17, 2009 at 7:42 PM

I figured it out by surrounding the map object with a div and manipulating the size of the div not the map object.  Then you can set the map object to 100% height and width.

Aug 18, 2009 at 4:03 PM

Ok I'm still stuck on something related to this.  I'm trying to create a thumbnail version of the map that expands when a user clicks on it.  The problem is I would like the map to not have to refresh.  Meaning i want a map thats 500px by 500px to be displayed at a lower resolution say 100px by 100px.  Does anyone know a control or technique I could use to do this?

I have it working using resizing divs but I have to refresh the map to change the size of the map control.  I have also been trying to use an IFrame and have the map control on another website but the map control does not resize with the IFrame.

I'm open to any ideas.