-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Provide method for transforming extent #171
Comments
I'm hoping to find an alternative solution to the use-case I described above but it seems that this would be a useful function to have available |
It would also be convenient to have the basic https://openlayers.org/en/latest/apidoc/module-ol_proj.html#.transform |
I would like to get the lat/lon for the four corners of the current view's extent. This s.o. explains how it can be done: https://stackoverflow.com/questions/28166471/openlayer3-how-to-get-coordinates-of-viewport
Unfortunately
var extent = map.getView().calculateExtent(map.getSize());
returns an extent in EPSG:3857 not EPSG:4326. OL has a method for transforming extents:extent = ol.proj.transformExtent(extent, 'EPSG:3857', 'EPSG:4326');
but because farmOS-map does not export this function it is not accessible without bundling parts of OL myself.Could we either export this function and make it available at
window.farmOS.map
or make it available on the farmOS-map instance itself?The text was updated successfully, but these errors were encountered: