Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
localization — Gideros Forum

localization

loves_oiloves_oi Member
edited August 2012 in General questions
What is localization exactly? Finding the coordinates of the user ? I want to make such a thing .
Thanks in advance

Comments

  • ar2rsawseenar2rsawseen Maintainer
    Accepted Answer
    No, no, no, no :)

    Localization is a support of different user's locales or languages. For example, if app is opened on a mobile phone with French language, then app would show in French, not in default english, etc.

    What you are looking for is Geolocation:
    http://www.giderosmobile.com/documentation/reference_manual.html#Geolocation
  • Thank you @ar2rsawseen , i copied and pasted the code in the link.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()
  • Like I said in the other topic, geolocation works only on the device.
  • Beside onLocationUpdate works fine, onHeadingUpdate is called only once when geolocation:start is called. onHeadingUpdate isn't called even you call geolocation:stop() and geolocation:start() again.
    Is this a bug or I'm using onHeadingUpdate in wrong way?

  • @folded and if you rotate the phone or change location, does it call the event then?
Sign In or Register to comment.