In the module map, CRS is an enum for Coordinate reference system.
the constructor is private, and there is only 3 projections
WGS 84 EPSG4326
WGS 84 / World Mercator EPSG3395
WGS 84 / Pseudo-Mercator EPSG3857
How can I use others projections ?
In the module map, CRS is an enum for Coordinate reference system.
the constructor is private, and there is only 3 projections
WGS 84 EPSG4326
WGS 84 / World Mercator EPSG3395
WGS 84 / Pseudo-Mercator EPSG3857
How can I use others projections ?
Hello!
Sorry for the late reply. Unfortunately, only these options available for configuring WMS layer. To use custom CRS you should define custom layer translator. For instance:
@LayerTranslator(type = WMSTileLayer.class)
@Component("app_AppWMSTileLayerLeafletLayerTranslator")
@Order(LeafletLayerTranslator.HIGHEST_PLATFORM_PRECEDENCE)
public class AppWMSTileLayerLeafletLayerTranslator extends WMSTileLayerLeafletLayerTranslator {
@Override
public LeafletLayerHolder<? extends LeafletLayer> translateLayer(Layer layer) {
LeafletLayerHolder<? extends LeafletLayer> leafletLayerHolder = super.translateLayer(layer);
LWmsLayer leafletLayer = (LWmsLayer) leafletLayerHolder.getLeafletLayer();
leafletLayer.setCrs(new Crs("custom")); // use custom CRS here
return leafletLayerHolder;
}
}
This layer translator will be used in all maps in the application.