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

How do i get the value of a geolocation to insert into textbox

The service should be defined like this:
Image

then Test:
Image

jimmy vu
Posts: 0
Joined: Thu Apr 04, 2013 10:26 am

How do i get the value of a geolocation to insert into textbox

3) In Geolocation service map latitude and longitude to localStorage variables -

  • the geolocation is grayed out? Where would this #3 look like?
    ---------------------------------------------------------------------------------
    4) In Request mapping to latlng add JS to get coordinates from localStorage.
    return localStorage.getItem("latitudeSaved") + ',' + localStorage.getItem("longitudeSaved");

  • Where would this code go? The button called "map me" has your button code:

    Image

  • where latitudeSaved and longitudeSaved - localStorage names (see item 3)

  • This would be the variable i created called "lat" and "lng".
    ---------------------------------------------------------------------------------
    5) Map Response formatted_address to textbox.

  • I don;t understand how to complete this step?
    ---------------------------------------------------------------------------------
    6) On success Geolocation service call created service (in item 1)

  • Ok, how do i fill in the textbox with the address? Not clear on this #6 either?

jimmy vu
Posts: 0
Joined: Thu Apr 04, 2013 10:26 am

How do i get the value of a geolocation to insert into textbox

... and that is it if you can help me get past these three that would be great help.

jimmy vu
Posts: 0
Joined: Thu Apr 04, 2013 10:26 am

How do i get the value of a geolocation to insert into textbox

that's it? If that's it still not working.

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

How do i get the value of a geolocation to insert into textbox

When in response mapping, you can create a local storage variable (right column, top). The variable will appear on right (bottom). You can then map the response to the variables.

http://docs.tiggzi.com/documentation/...

jimmy vu
Posts: 0
Joined: Thu Apr 04, 2013 10:26 am

How do i get the value of a geolocation to insert into textbox

Excellent, trying now ...

jimmy vu
Posts: 0
Joined: Thu Apr 04, 2013 10:26 am

How do i get the value of a geolocation to insert into textbox

Still stuck on what she meant by creating one variable "latlng" and assigning it the same value?

4) In Request mapping to latlng add JS to get coordinates from localStorage.
return localStorage.getItem("latitudeSaved") + ',' + localStorage.getItem("longitudeSaved");

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

How do i get the value of a geolocation to insert into textbox

Once you saved lat/lon into local storage, you would use the values as input to the http://maps.googleapis.com/maps/api/g... service. See screen shots I posted above.

jimmy vu
Posts: 0
Joined: Thu Apr 04, 2013 10:26 am

How do i get the value of a geolocation to insert into textbox

sorry don't see the screen shot?

Return to “Issues”