Skip to content

Incorrect Transformation Label of Grid Layer From EPSG:3857 to EPSG:4326 #3913

@kttary

Description

@kttary

I try a center of map on EPSG:3857 and want to show grid label on EPSG:4326. The json request as follow:

{
  "layout": "A4 portrait",
  "outputFormat": "png",
  "attributes": {
	"attribution": "© OpenStreetMap",
    "map": {
      "center": [
        -714505.2678510527, 11902948.874436975,
      ],
	  "longitudeFirst": true,
      "scale": 10000,
      "dpi": 300,
      "layers": [
		{
			"type": "grid", 
			"gridType": "points", 
			"numberOfLines": [2,2], 
			"haloRadius": 5, 
			"haloColor": "#FFF", 
			"labelFormat": "%1.5f", 
			"indent": 5, 
			"labelProjection": "EPSG:4326", 
			"rotateLabels": false, 
			"font": {"size": 5, "style": "PLAIN"}
		}, 
      ],
      "projection": "EPSG:3857",
      "rotation": 0
    }
  }
}

and it generate wrong coordinate on map

Image

The map show longitude of 72.409 instead of 106.925. I'm using mapfish version 3.23.0. Any suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions