How to get my current location using GPS [help needed]
Dear developers, My story: I'm an employee of a travel company and my task is to make photos for a new travel location in the US. So I want to make photos with my app which automatically locates where I took the photo and sends it to the DB of the company I am working for. So they know the exact location. but after walking many miles I come in a ghost town. I don't know my location so I want to start my app and see what is my current location. (the app should automatically search through GPS for my location. After it retrieved my current location on a map (like Google maps). I can see on the map that I'm just in a ghost town a few miles outside of Detroit. This was a story of what the app I want to build should be able of. Please help me out I'm a starter and don't know much about how mendix works I already did the training courses. Best Regards, Niels Update: Date of Update: Friday 9th of October I've studied the sample app and I tried to remake it and while remaking it I came to the conclusion that it isn't using the "geolocation for phonegap" widget completely (which is what I expected from it) because what the sample app does is: the sample app has already a start point and endpoint, it just shows the route from point A to point B. So it is not locating my current location by GPS at all sometimes the app is using Internet instead of GPS which is weird. So can anyone please help me out?
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.
Have a a look at the company expenses demo in the appstore. I think it pretty much covers what you need.
Marcel Groeneweg ITV
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