You should take a look at the sample app on the AppStore called field service app. It's under the sample apps. It does pretty much everything you explained, apart from detect the gps automatically. The current widget requires you to press the button to get the gps, but it would very straight forward to add some code to the widget to execute it when a page opens.
Also check out this widget:
https://appstore.home.mendix.com/link/app/1380/Mendix/Geolocation-for-PhoneGap
Have a a look at the company expenses demo in the appstore. I think it pretty much covers what you need.
And since I assume this is for a mobile device also take a good look at the documentation regarding Mobile Mendix apps
To achieve your goal, you can create a mobile app using Mendix that utilizes the device's GPS to retrieve your current location, displays it on a map (like Google Maps), and sends the my location data to your company's database, ensuring they have the exact location information of the photos you take.
or you can use the example provided by where am i app by plugging the app into Google Maps API. This should work just fine together with Mendrix