Leaflet.DistortableImage
Leaflet.DistortableImage copied to clipboard
Use data of ditortableImage to load the image in ol map
I would like to use the data generated by the DistortableImage (corners, center etc) to create an equivalent map but using ol API instead of Leaflet one (beacause of the possibility of view rotation in ol). Is it possibile and how? Can some please give me a hint?
Thanks for opening your first issue here! Please follow the issue template to help us help you 👍🎉😄 If you have screenshots to share demonstrating the issue, that's really helpful! 📸 You can make a gif too!
I'm trying using ol-ext with GeoImage but the problem is that distortableImage uses the image corners instead of the scale factor used by ol.
Assuming that distortAction will be disabled, is there a way to get the scale factor from the distortableImage api? O otherwise a way to calculate it?
here the test app https://codesandbox.io/s/suspicious-engelbart-xiv31 the img corners should match the circle features
the actual value of scale are generated using http://viglino.github.io/Map-georeferencer/
thank you
@mdellanave I'll open a feature request to add a getScale method to the API.
@mdellanave I'll open a feature request to add a
getScalemethod to the API.
thank you @sashadev-sky!!!
@mdellanave have you found a solution to use something like this plugin but for open layers?
@mdellanave have you found a solution to use something like this plugin but for open layers?
Yes I'm currently using this https://viglino.github.io/ol-ext/examples/interaction/map.interaction.transform.html and this https://viglino.github.io/ol-ext/examples/layer/map.geoimage.html
@mdellanave have you found a solution to use something like this plugin but for open layers?
Yes I'm currently using this https://viglino.github.io/ol-ext/examples/interaction/map.interaction.transform.html and this https://viglino.github.io/ol-ext/examples/layer/map.geoimage.html
😮 how do you mix the transform with the geoImage? I'm kinda noob of open layers.
I would like to do the distortion of any type of image.
Do you have some example? I would really appreciate it
Try with this one! ;-) It is the best result I have been able to achieve.
cheers
Try with this one! ;-) It is the best result I have been able to achieve.
cheers
Wow thank you so much for the example and time. I tested and is working fine. The only 'issue' is that I tried to set keepAspectRatio to false and is not working, but I assume that is harder or the demo doesn't handle that case. Anyway, thank you again 🙂