ThinkGeo.com    |     Documentation    |     Premium Support

Adding Dynamic Layer Overwrites Google Background In IE6

In my map application there is a page with the WebEdition map control that uses the Google Maps background. The user can add a dynamic layer to the with the contents of a specific, developer-defined, shape file. When I do this the shape is added to the map and displays just fine in IE7. Unfortunately my client still has a lot of workstations that use IE6 and when they use this page the Google background is covered in blue when I add the dynamic layer. If I add a layer switcher and they turn that layer off the Google background show ups just fine. So it's clearly an interaction with IE6 and dynamic layers.


Any help greatly appreciated,


Bob Mc.



Bob,


 It’s a known issue that IE6 doesn’t support transparent PNGs. This issue has been worked around in the latest Web Edition (3.0.115) which just released a couple hours ago, please get it from ThinkGeo and have another try.  One customer has asked the same question here where you can also find some sample codes how to integrate data with GoogleMap with the new edition.
 
Ben.

The latest beta did correct the IE6 overlay problem, thanks.


However, it did introduce another problem. I now cannot see the PanZoomBar even though I have in enabled in my code. I can see it in your sample application in the page entitled "ShapeFilesOverGoogleMap" but when I copy your code from that page into a brand new VS web site project I do not get the PanZoomBar. Is there an image file or style that I'm missing?


Bob Mc.



Bob, 
  
 This is a bug that the theme pics are lost when creating a new Web Site instead of a new Web Project.  We have solved this and will release a new version today (3.0.117). Please have another try later. 
  
 Ben. 


Also notice that, now the static layer caches the image when you zoom in which is nice. 
  
 How can I do that for the dynamic layer ?  I tried to use google map and by default the map should stay until a new image is downloaded but with Mapsuite it’s different. 
  
 Try  maps.google.com , you will know what I mean.

Thanks Ben. I've downloaded the new beta and will test.


If you could answer one more question for me it would be helpful. It appears from the new samples that, when using a Google Map in a custom overlay, the proper MapUnit is GeographyUnit.Meter. When I do this, my plotted locations in my Marker Overlay, which are plotted using Lat and Lon, now show up in the Atlantic Ocean rather than in the U.S. I presume this is due to the different MapUnit. How do I plot features using Lat/Lon when the MapUnit is Meter?


Thanks,


Bob Mc.



Mapsuitedev,  
  
 Thanks for post!  
  
 Currently transition effects are only available on the LayersOverlay and the WMSOverlay.  If you use the DynamicOverlay property on the map control then that has a transition effect property you can set.  We are looking into if we can offer that for GoogleMapsOverlay and the MarkerOverlays. 
  
 Ben.

Bob,


As GoogleMap uses a different projection than DecimalDegree, we need to convert the projection first before we draw the marker on GoogleMap. The codes below shows how to add one specific marker, also please see the sample Markers ->AddProjectedMarkers if you want to add markers from a shape file on GoogleMap,


protected void Page_Load(object sender, EventArgs e)
        {
              if (!Page.IsPostBack)
            {
                Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#B3C6D4"));
                Map1.CurrentExtent = new RectangleShape(-13939426.6371, 6701997.4056, -7812401.86, 2626987.386962);
                Map1.MapUnit = GeographyUnit.Meter;

                Map1.MapTools.OverlaySwitcher.Enabled = true;
                Map1.MapTools.MouseCoordinate.Enabled = true;

                // Setup my Marker Overlay
                InMemoryMarkerOverlay markerOverlay = new InMemoryMarkerOverlay();
                markerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.WebImage = new WebImage("../../theme/default/samplepic/circle.png");
                markerOverlay.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

                // Set the correct projection (Decimal Degrees to Google’s)
                Proj4Projection proj4 = new Proj4Projection(Proj4Projection.GetEpsgParametersString(4326), Proj4Projection.GetGoogleMapParametersString());
                markerOverlay.FeatureSource.Projection = proj4;

                // Start adding my decimal degree points
                markerOverlay.Features.Add("LawrenceKansas", new Feature(-95.253199, 38.959902));

                GoogleOverlay google = new GoogleOverlay("Google Map");
                google.JavaScriptLibraryUri = new Uri("maps.google.com/maps?file=api&v=2&key=ABQIAAAAoxK_HcqphMsnUQHEwLwHlRSavkNJi0NVTgm4UDidoiIU5dUJpRQW88FufPCp0aTPraxZgZFAIUHn3Q");
                google.GoogleMapType = GoogleMapType.Normal;

                Map1.CustomOverlays.Add(google);
                Map1.CustomOverlays.Add(markerOverlay);
            }
        }


Here is the result:


 




Ben.

I had actually arrived at the same solution about an hour before I picked up your post, but thanks for the confirmation Ben. 
  
 Bob Mc.

Bob, Just let us know for any more queries.  
 Ben.