I usually use something like map.getViewport().setCoordinateReferenceSystem(DefaultGeographicCRS.WGS84);
Looking at JCRSPopupMenu shows that they use mapPane.getMapContent().getViewport().setCoordinateReferenceSystem(newCRS); which I suspect boils down to the same thing. Ian On Wed, 9 Dec 2020 at 13:51, Jonas Schrottenbaum <jonesang...@googlemail.com> wrote: > Oh, how do i set the map CRS? I thought it was > mapPane.setCRS(DefaultGeographicCRS.WGS84) but that had no effect. > > Am Mi., 9. Dez. 2020 um 14:43 Uhr schrieb Ian Turton <ijtur...@gmail.com>: > >> You can set the map CRS to what ever you want, if you don't specify it >> then it defaults to the first layer's CRS >> >> Ian >> >> On Wed, 9 Dec 2020 at 13:33, Jonas Schrottenbaum via GeoTools-GT2-Users < >> geotools-gt2-users@lists.sourceforge.net> wrote: >> >>> Hello, >>> >>> is it possible to transform all incoming layers into for example >>> epsg:4326? >>> So no matter what the CRS of a WMSLayer, or FeatureLayer is, they can >>> always be overlaid? >>> >>> Default seems to be that the first incoming layer specifies which CRS is >>> used, and all other layers coming after that are transformed into the CRS >>> of the first one. >>> >>> Best regards >>> _______________________________________________ >>> GeoTools-GT2-Users mailing list >>> GeoTools-GT2-Users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >>> >> >> >> -- >> Ian Turton >> > -- Ian Turton
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users