Sorry, I always assume people are using the supported modules unless they
say otherwise. I've no idea what SWT does.

Ian

On Wed, 9 Dec 2020 at 14:38, Jonas Schrottenbaum <jonesang...@googlemail.com>
wrote:

> The quickstart is with the swing module, right? I'm using SWT, so maybe
> there is the problem. Thanks for your help so far. Have to look into that.
>
> Am Mi., 9. Dez. 2020 um 15:37 Uhr schrieb Ian Turton <ijtur...@gmail.com>:
>
>> I've just experimented with adding the line
>>
>>
>> map.getViewport().setCoordinateReferenceSystem(DefaultGeographicCRS.WGS84);
>>
>> at line 53 of the GeoTools quickstart and opening a shapefile in
>> EPSG:27700, the map is displayed in EPSG:4326 when the display is made
>> visible.
>>
>> Ian
>>
>> On Wed, 9 Dec 2020 at 14:19, Jonas Schrottenbaum <
>> jonesang...@googlemail.com> wrote:
>>
>>> 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
>>>>>
>>>>
>>
>> --
>> Ian Turton
>>
>

-- 
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