Page 1 of 1

Geolocation: Getting Geo Data Into Text Labels (Newbie question)

Posted: Thu May 08, 2014 8:42 am
by PeteB

Hi Appery group

I am a uber-newbie to appery, so please forgive this most basic question.

I am playing with Appery and was trying to use the Geolocation service to simply display the lat and long into some text fields/labels. I thought that if I:

  1. Defined the Geolocation service on the page

  2. Placed some labels on the page

  3. Mapped the labels to the lat and long parameters from the service, and

  4. Started the service on page load

    ... it would place the mapped parms into the fields. It doesn't seem to be working that way. The tutorials all seem to demonstrate the Geolocation service with a Google Map and use a little Javascript to act as a go-between.

    I would have thought that that wasn't necessary with my text labels. What would be the point of mapping the Geolocation parms and text labels if it was all done in Javascript.

    Am I wrong about that? Maybe I do need the Javascript? Maybe I'm missing something else entirely?

    Any comment on what's missing on my basic 4-point method above would be greatly appreciated.

    Thanks!

    PeteB


Geolocation: Getting Geo Data Into Text Labels (Newbie question)

Posted: Thu May 08, 2014 9:04 am
by Evgene Karachevtsev

Hello Pete,

Are there any errors in the browser console? Try using another event "page show" for example.


Geolocation: Getting Geo Data Into Text Labels (Newbie question)

Posted: Thu May 08, 2014 9:57 am
by PeteB

Hi Evgene

Thanks for the super-fast reply.

I have tried the 'page show' event and the 'load' event to start the Geolocation service. Neither seem to trigger the text labels to show the service's lat and long as per the mappings I've set up.

I'm obviously missing something really basic.

Am I right to think that the labels should update as per the mappings automatically when the service starts?

PeteB


Geolocation: Getting Geo Data Into Text Labels (Newbie question)

Posted: Thu May 08, 2014 10:06 am
by PeteB

Oh, hang on. I think it is working in the IDE test area in the browser.

If it's working there I should be able to get it working on the phone. My logic must have been right.

Maybe the 'page load' event worked.

Love your product!

PeteB


Geolocation: Getting Geo Data Into Text Labels (Newbie question)

Posted: Thu May 08, 2014 10:08 am
by Evgene Karachevtsev

Thank you for the update. Do not hesitate to contact us if you need any further help.