Adding Custom WebMapServiceImageryProvider ,How to set the local coordinate and EPSG:3067


I am trying to add local tiles with EPSG:3067 here is the code. The problem is it is requesting with EPSG::4326 with lat lon bbox while i want it to be in local coordinates system which EPSG:3067

var url=‘’; //Geoserver URL
var layers = viewer.imageryLayers;
    layers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({
        url : url,
         parameters: {
                                crs: ‘EPSG:3067’
                        } ,
        layers: ‘ortokuvat’// Here just give layer name

**error in the network tab for each tile***

Here is the error because it request for the tile as Request URL:
Request Method:GET
Status Code:401 Authorization Required

************The correct format **********

In your code sample you’re setting the parameter ‘crs’ instead of ‘srs’. I believe this is your problem. If that’s still not working you may need to define your own TileScheme that you can pass to the new Cesium.WebMapServiceImageryProvider

Hi, yes srs error is solved but now the bbox is still in wgs84 i.e in lat lon i need to be in local coordinates. could you please tell me how to specify this in code? thanks :slight_smile:

The Bounding Box is generated from the TilingScheme that is passed in during creation. EPSG:3067 is not a predefined tiling scheme so you’re going to need to create your own.

Requesting the tiles in the right projection is only half the battle. You also need to make sure that Cesium knows how to map them onto the globe or else they will be georeferenced incorrectly. This is going to be a lot of work.

If at all possible, I recommend using a WMS server that can serve map images in geographic (EPSG:436) or Web Mercator (EPSG:3857). Pretty much all standard WMS servers can do this, and it will save you many many hours of headaches.


If its coming from geoserver, you should be able to have the server reproject to 4326 or 3857, instead of trying to load it in its native format.

Saving many hours of headaches, does this means its possible? and has anyone come up with an example.

First part of the problem will be getting past the issue of this guard:

Gonna use another day try to get a custom projection running myself but hoping someone has tried and succeded.