Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

google map address

Hi,
I have a google map that will find the gps position of the phone, the address shows on the map with a marker, is there a way for the found address to be inserted in text into the input component,

heres a screenshot
hope this helps

Image

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

google map address

If you got the address string, you can do something like this to set the value into the input component:

code
Tiggzi('input_name').val(address);
/code

http://docs.tiggzi.com/javascript-api/

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

google map address

Thanks Max,
Im lost here, do I get address string with js or jquery?

I came accross this,is this where I need to be?

var street = $(xml).find("address").find("street").text();

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

google map address

How do you get the address string into the marker?

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

google map address

I dont know how to get the address string into the marker,

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

google map address

[quote:]
I have a google map that will find the gps position of the phone, the address shows on the map with a marker
[/quote]
I thought you are able to display it...

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

google map address

Sorry Max,
I misunderstood,
the map is the geolocation plugin, with invoke service onclick, I can see that I have other components "marker1, map1 and location

so I tried the code above on marker1, value change, run custom js

Tiggzi(findtext'input').val(address);

didn't work, but i'm out of my depth again!

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

google map address

Place a label component inside the marker, and try:
Tiggzi('label_component_name').text(address);

it assumes that you already have the address value.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

google map address

Hi,
I have tried numerous way to achieve this, but no luck.

I am able to get the marker to display the current location of a phone on button click.

Max supplied the code above to be used assuming I have the address value,

Can you tell me where the address value would be?

Which components has this info after button click?

I have placed a label inside the marker
and used the following Tiggzi('markerlabel').text(address);
on value change with no result

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

google map address

Hello,

Google has special API to find address by coordinates
https://developers.google.com/maps/do...

For example, if you open URL:
http://maps.googleapis.com/maps/api/g...
Google will return JSON structure contain coordinates (54.978334, -1.617361)

Return to “Issues”