Skip to content

[Bug] WMSLayer positions EPSG:4326 images as CARTESIAN #10806

Open

Description

@athomct

Description

WMSLayer positions EPSG:4326 images as if they were Web Mercator.

renderLayers() picks the BitmapLayer image coordinate system from lastRequestParameters.srs:

_imageCoordinateSystem:
  lastRequestParameters.srs === 'EPSG:4326' ? COORDINATE_SYSTEM.LNGLAT : COORDINATE_SYSTEM.CARTESIAN,

The stored object is the GetImageParameters passed to getImage(), whose field has been crs since #8262 (crs: srs). lastRequestParameters.srs is always undefined, so the image is always CARTESIAN. This affects srs: 'EPSG:4326' and srs: 'auto' under GlobeView, which resolves to EPSG:4326.

Expected Behavior

An image requested in EPSG:4326 is rendered with _imageCoordinateSystem: COORDINATE_SYSTEM.LNGLAT.

Steps to Reproduce

Render new _WMSLayer({data: wmsUrl, layers: [...], srs: 'EPSG:4326'}) in a MapView: the GetMap request uses CRS=EPSG:4326, but the image is stretched as a Web Mercator rectangle. Reproduced on master with a unit test that records the request and inspects the sub layer.

Environment

  • Framework version: deck.gl master (b04c8f2), also 9.4.0
  • Browser: any
  • OS: any

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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