Page 3 of 9
How do i get the value of a geolocation to insert into textbox
Posted: Fri Apr 05, 2013 3:51 am
by maxkatz
The service should be defined like this:
then Test:
How do i get the value of a geolocation to insert into textbox
Posted: Fri Apr 05, 2013 3:53 am
by jimmy vu
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:
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?
How do i get the value of a geolocation to insert into textbox
Posted: Fri Apr 05, 2013 3:54 am
by jimmy vu
... and that is it if you can help me get past these three that would be great help.
How do i get the value of a geolocation to insert into textbox
Posted: Fri Apr 05, 2013 4:19 am
by jimmy vu
that's it? If that's it still not working.
How do i get the value of a geolocation to insert into textbox
Posted: Fri Apr 05, 2013 4:29 am
by maxkatz
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/...
How do i get the value of a geolocation to insert into textbox
Posted: Fri Apr 05, 2013 4:46 am
by jimmy vu
Excellent, trying now ...
How do i get the value of a geolocation to insert into textbox
Posted: Fri Apr 05, 2013 4:53 am
by jimmy vu
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");
How do i get the value of a geolocation to insert into textbox
Posted: Fri Apr 05, 2013 4:54 am
by jimmy vu
How do i get the value of a geolocation to insert into textbox
Posted: Fri Apr 05, 2013 4:55 am
by maxkatz
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.
How do i get the value of a geolocation to insert into textbox
Posted: Fri Apr 05, 2013 5:02 am
by jimmy vu
sorry don't see the screen shot?