How change de project of WMS using class of BruTileLayer??

Jan 17, 2014 at 9:55 AM
Edited Jan 17, 2014 at 9:58 AM
Code (change two time de proyect, 1: layer bruti and 2 map of DoSpatial control:
        this.map1.MapFrame.SuspendEvents();
        DotSpatial.Controls.BruTileLayer bruTileLayer1 = BruTileLayer.CreateGoogleMapLayer ();
        bruTileLayer1.Projection = KnownCoordinateSystems.Projected.UtmOther.ETRS1989UTMZone30N; 
        bruTileLayer1.Reproject (KnownCoordinateSystems.Projected.UtmOther.ETRS1989UTMZone30N);
        bruTileLayer1.LegendText = "Google Maps";
        bruTileLayer1.UseDynamicVisibility = true;


        this.map1.Layers.Add(bruTileLayer1 );
        this.map1.Projection = KnownCoordinateSystems.Projected.UtmOther.ETRS1989UTMZone30N;
        this.map1.MapFrame.ResumeEvents();
        this.map1.ZoomToMaxExtent();
        this.map1.Refresh();
I need worl with wms of googlemap of similar. The problem is: Not change the project in layer Bruti,
Thank.
Albpuig.
Editor
Jan 17, 2014 at 2:33 PM
Reprojection of tiles is not supported by the "old" BruTileLayer.
You need to use the "new" one that you can find here:
http://github.com/fobermaier/DotSpatial.Plugins
Jan 20, 2014 at 10:28 AM
Thank very much FObermainer.

I have had many problems to compile it provided that it did not have the last dll and have them had unload and to compile them. After all that I have tried again and do not achieve the code makes work. My code is the following one:


this.map1.MapFrame.SuspendEvents();
        BruTileLayer bruTileLayer1 = BruTileLayer.CreateBingHybridLayer();
        bruTileLayer1.Projection = KnownCoordinateSystems.Projected.UtmOther.ETRS1989UTMZone30N;
        bruTileLayer1.Reproject(KnownCoordinateSystems.Projected.UtmOther.ETRS1989UTMZone30N);
        bruTileLayer1.LegendText = "Google Maps";
        bruTileLayer1.UseDynamicVisibility = true;


        this.map1.Layers.Add(bruTileLayer1);
        this.map1.Projection = KnownCoordinateSystems.Projected.UtmOther.ETRS1989UTMZone30N;
        this.map1.MapFrame.ResumeEvents();
        this.map1.ZoomToMaxExtent();
        this.map1.Refresh();
but not run. What's the problem? Exists a new code for use that library?

Thanks very much...