So i also tried mapPane.setCrs(CRS.decode("EPSG:4326"))
and 
mapContent.getViewport().setCoordinateReferenceSystem(CRS.decode("EPSG:4326")),
which both change the CRS you get by
calling mapContent.getCoordinateReferenceSystem(), but as soon as the first
layer comes, it overwrites it with it's own (EPSG:23700)

Am Mi., 9. Dez. 2020 um 14:50 Uhr schrieb Jonas Schrottenbaum <
jonesang...@googlemail.com>:

> 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
>>
>
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to