Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
finding the coordinates — Gideros Forum

finding the coordinates

loves_oiloves_oi Member
edited August 2012 in General questions
I want to take my coordinates. I copied and pasted the code in the link : http://www.giderosmobile.com/documentation/reference_manual.html#Geolocation

When i ran it , it gives a blank screen on the simulator. The below code is complete or should i add something different to this code in order to take my coordinates:
require "geolocation"
 
local function onLocationUpdate(event)
    print("location: ", event.latitude, event.longitude, event.altitude)
end
 
local function onHeadingUpdate(event)
    print("heading: ", event.magneticHeading, event.trueHeading)
end
 
geolocation:addEventListener(Event.LOCATION_UPDATE, onLocationUpdate)
geolocation:addEventListener(Event.HEADING_UPDATE, onHeadingUpdate)
geolocation:start()

Comments

Sign In or Register to comment.