In my Page_Load() method I set up the Google page:
Map1.BackgroundMap.GoogleMap.Name = "Google Map";
Map1.BackgroundMap.GoogleMap.GoogleMapType = GoogleMapType.Normal;
Map1.BackgroundMap.GoogleMap.LibraryUri = new Uri("maps.google.com/maps?file=api&v=2&key=ABQIAAAAoxK_HcqphMsnUQHEwLwHlRSavkNJi0NVTgm4UDidoiIU5dUJpRQW88FufPCp0aTPraxZgZFAIUHn3Q");
Then, in an event handler I turn off the map:
Map1.BackgroundMap.GoogleMap.GoogleMapType = GoogleMapType.None;
This works, but if I then try to turn it back on in another event handler:
Map1.BackgroundMap.GoogleMap.GoogleMapType = GoogleMapType.Normal;
nothing happens.
Also, if I set up the Google map as stated above, but set the GoogleMapType to None, and later try and turn it on by setting the GoogleMapType to Normal, nothing happens. Setting up everything (Map1.BackgroundMap.GoogleMap) in an event handler doesn't work either. Are there any other commands for using BackgroundMap.GoogleMap? Are there direct commands that the layer switcher uses that we can access from the client-side?
I think that a command like Map1.BackgroundMap.GoogleMap.IsVisible = True / False would be great and something like this would help me in what I am trying to do.
Thanks,
Tom