Working with GeoLocation showing only 0 and 0

Get help using Construct 2

Post » Wed Dec 04, 2013 2:19 am

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
B
5
S
1
Posts: 78
Reputation: 556

Post » Wed Dec 04, 2013 11:47 am

If you are testing it on a PC that would be expected behavior.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Wed Dec 04, 2013 12:05 pm

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.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Wed Dec 04, 2013 1:23 pm

any sample tutorial to go with that?
B
5
S
1
Posts: 78
Reputation: 556

Post » Wed Dec 04, 2013 1:42 pm

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.

Tutorial:

add an event:
System on start of layout
- geolocation request location.
- system set text : geolocation.longtitude&","geolocation.lattitude
LittleStain2013-12-04 13:43:00
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Dec 04, 2013 4:11 pm

@broprog - haven't you ever looked through the examples that come with Construct 2? There's a Geolocation one right there.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Wed Dec 04, 2013 4:55 pm

i know how to code in the geolocation stuff, just not working in preview. So i guess its something with the browser
B
5
S
1
Posts: 78
Reputation: 556


Return to How do I....?

Who is online

Users browsing this forum: lukewasthefish, Yahoo [Bot] and 16 guests