Hide Map

Last post 6/14/2010 8:59:48 PM by franck. 2 replies. << Back to Web.Maps.VE v3.0 General
3/17/2010 2:15:53 AM
timparis

Hide Map

I'm trying to hide the map on my page and then display it after the user clicks a button. I'm testing this out with a basic map:

<Simplovation:Map ID="homeMap" runat="server" Width="600px" Height="400px"/>

If set the map to visible="false" in the aspx code or OnPageLoad and then try to set it to visible="true" on button click it doesn't become visible.

If I make it visible to start, I can hide and show it via button clicks, but once I it on page load I can't get it to appear again.

I've tried putting it inside of an asp:panel and setting the panel visible="false", but the map is still visible on page load.

What's the best way to show and hide the map? The button click events seem to work, but I need to hide it on page load.

Thanks all help is appreciated.

3/28/2010 5:13:30 PM
Chris Pietschmann

Re:Hide Map

This should work when done within asp:Button OnClick event handlers, but you'll need to make sure those buttons are not within any UpdatePanels, and that the buttons OnClick event generates a full postback of the page. The full post back will allow the full page to be re-rendered with the Map being visible after the button is clicked.
6/14/2010 8:59:48 PM
franck

Re:Hide Map

Hi Chris,

I had the exact same problem and it got fix thanks to your answer. However, I'd like to know if there's a way to make the map invisible WITHOUT having to request a full post back. 

Thx
Franck