Hi @se18023! @warren and I are in the final stages of incorporating an "EXIF" module (better UI, as mentioned above) that will enable you to do just that!
Quoting your question here, "Can geotagged aerial images be automatically placed in the right location on the map according to their coordinates?", I'd say, the short answer would be yes, they can be, and even though some functionality regarding that exists as of now, as I mentioned above, we are currently working on an even better UI solution for the same.
Now for the long answer, let me throw some light on exactly how this happens. Have a look at the
gif below, it's a demo of the improved solution I was talking about.
Now what exactly is happening under the hood, is that,
As soon as the user clicks the "geolocate" button on the toolbar, the module looks for any metadata (camera model, coordinates, etc.) associated with that image.
If the image has the said metadata attached to it, it extracts the
GPSLongitude properties of the image (i.e., the coordinates where it was originally taken, or is associated with), along with its orientation (
Orientation), direction (
GPSImgDirectionRef), altitude (
GPSAltitude), etc., for displaying relevant information in the console (see above) and geolocating as well.
Using the coordinates, we simply calculate the newer "corner points" of the image (see below) and "place" it on the map accordingly.
// calculate new image points on the map
// `lat` and `lng` here are the coordinates we picked from the image
overlay._corners = new L.latLng(lat + height / 2, lng + width / 2);
overlay._corners = new L.latLng(lat + height / 2, lng - width / 2);
overlay._corners = new L.latLng(lat - height / 2, lng + width / 2);
overlay._corners = new L.latLng(lat - height / 2, lng - width / 2);
// rotate image according to its original orientation
// set initial view to be zoomed in to newer coordinates
overlay._map.setView(new L.latLng(lat, lng), 14);
Please let us know if you have any further doubts and/or require some clarification on any of this. Thanks!
Is this a question? Click here to post it to the Questions page.
Thank-you for your reply and clearing that up. That would be a very useful feature to have indeed! Unfortunately it doesn't recognise the tags on my photos which means they cannot be automatically placed as of yet.