Skip to content

transformExtent doesnt convert coordinates correctly from ESPG:5514 to ESPG:3857 #13503

@ersi77

Description

@ersi77
this.map().setView(new View({
  projection: 'EPSG:3857',
  center: fromLonLat([50.075710, 14.472606]),
  zoom: 10,
  enableRotation: false
}))
extent = transformExtent(extent, 'EPSG:5514', this.map().getView().getProjection().getCode())
this.map().getView().fit(extent)

Im having problem with mapview zooming out a bit on every website refresh, it seems like transformExtent doesnt convert coordinates correctly

my coordinates in ESPG:5514

-1703543.6824992644
-649373.7717948385
-1702696.1524791967
-648498.8826321261
coordinates that I get from transformExtent from ESPG:5514 to ESPG:3857

-17013.595185768834
6712287.035442345
-15271.234295750599
6714060.781263472
coordinates that I get from epsg.io online converter of coordinates

-16528.31
6712365.39
-15713.53
6714139.10

any tips how to fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions