Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Game development stories & opinions
Hi I like to know more about getting GeoLocation correctly for mobile app. Please let me know what to be careful of so I can get it correctly in mobile app because the browser preview is showing "0, 0" for Long and Lat
If you are testing it on a PC that would be expected behavior.
Some PCs can still get a very approximate location (e.g. identifying your city). Post a .capx so we can test ourselves. Don't forget you need to request the geolocation position or watch it before it returns anything other than 0.
any sample tutorial to go with that?
Develop games in your browser. Powerful, performant & highly capable.
Geolocation in the Manual
Looking at the geolocation actions you should first add an action to watch the location or request a location before it will return anything.
add an event:
System on start of layout
broprog - haven't you ever looked through the examples that come with Construct 2? There's a Geolocation one right there.
i know how to code in the geolocation stuff, just not working in preview. So i guess its something with the browser