Srihari Yamanoor
Posts: 0
Joined: Sat Jun 16, 2012 10:37 pm

Geolocation Service Problem

Geolocation appears to be working, but the output values are not working. Here is what I have done - I have a simple button that invokes the geolocation service, and I mapped one output variable mapped to a label text on one cell in a grid. Chrome and my android phone both seem to invoke the service, but the value is not being written. I am obviously missing a step or something. Any help is much appreciated!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Geolocation Service Problem

How did you test that the service being invoked?

When you map, add the following in JavaScript mapping:

code
console.log(value);
return value;
/code

and check in browser's console what is being returned.

Srihari Yamanoor
Posts: 0
Joined: Sat Jun 16, 2012 10:37 pm

Geolocation Service Problem

Thanks Max, this is what I get: TypeError Cannot read property 'watchPosition' of undefined

While I look for what I am doing wrong, I thought I would share it with you quickly.

Srihari Yamanoor
Posts: 0
Joined: Sat Jun 16, 2012 10:37 pm

Geolocation Service Problem

I had the javascript in the wrong place. Putting it next to the mapped field, DOES return the lattitude: 37.7667813 . However, it fails to populate the label text.

Here is how I did the label text: I created a cell grid and then I added the "label" field. I added "Latitude" as the text label. I went to the Geolocation service, and created an output map from the latitude field to this label.

Srihari Yamanoor
Posts: 0
Joined: Sat Jun 16, 2012 10:37 pm

Geolocation Service Problem

Ah sorry, I was mapping it to Visible and not Text. Serious NOOB mistake! Thanks for the help.

Srihari Yamanoor
Posts: 0
Joined: Sat Jun 16, 2012 10:37 pm

Geolocation Service Problem

It still doesn't work on my Android Phone. Any tips would be really appreciated.

Return to “Issues”