Hello. My project has a requirement to use a map server with the EPSG:4326 projection. Is there anything I can do to enable that projection when in 2D mode? I've successfully used that projection in a standalone Leaflet implementation in a different app.
In node_modules/terriajs/lib/ViewModels/TerriaViewer.js, I added the crs property in selectLeaflet():
map = L.map(this._mapContainer, {
zoomControl: false,
attributionControl: false,
maxZoom: this.maximumLeafletZoomLevel,
zoomSnap: 1, // Change to 0.2 for incremental zoom when Chrome fixes canvas scaling gaps
preferCanvas: true,
worldCopyJump: true,
crs: L.CRS.EPSG4326 //my change here
}).setView([-28.5, 135], 5);
And since I'm using an ArcGIS server, in node_modules/terriajs/lib/Models/ArcGisMapServerCatalogItem.js, I changed the tiling scheme in _createImageryProvider():
var imageryProvider = new ArcGisMapServerImageryProvider({
url: cleanAndProxyUrl(this, baseUrl),
layers: getLayerList(this),
tilingScheme: new GeographicTillingScheme(), //my change here
maximumLevel: maximumLevel,
mapServerData: this._mapServerData,
enablePickFeatures: defaultValue(this.allowFeaturePicking, true)
});
Following up from my previous posts, I've pulled the latest version of Terria, so I'm on 5.2.11.
Thanks,
Bart