-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: lonLatCenter & lonLatExtent #1181
Conversation
✅ Deploy Preview for eoxelements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a very basic story showcasing this, but probably better than nothing. |
Thanks for the story. We should do documentation of all utility functions in the same place, once they are all exported. They probably don't need a map in their story |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial integration tests showed a small issue that was corrected, further tests seem to work as expected, so i think this is good to go!
Thank you @RobertOrthofer for the implementation!
Implemented changes
This PR adds the read-only-properties
EOxMap.lonLatCenter
andEOxMap.lonLatExtent
, which return the current center and extent in EPSG:4326, no matter the current projection of the view.Additionally, the new methods
transform
andtransformExtent
are now exposed, allowing more flexible transformations between all registered coordinate systems. Basically, these methods are theol/proj
transform and transformExtent functions, with the small adaptation that thedestination
defaults toEPSG:4326
if not defined.Screenshots/Videos
Checklist before requesting a review