Re: API Google MAPS

smbepiec
Mon, 08 Nov 2010 14:13:57 -0000

On 08/11/10 14:44, h0bit wrote:

>  	//document.getElementById("Longitud").innerHTML =
marker.getPosition().lng();
>     	//document.getElementById("Latitud").innerHTML =
marker.getPosition().lat();



I think you just have to uncomment these lines and add some html like:

Longitude:
Latitude:


Wherever you want to display it.

(or perhaps if you want to use disabled textfields with id="lng" |
"lat"
uncomment:)

>	//document.getElementById("lng").value =
marker.getPosition().lng();
>     	//document.getElementById("lat").value =
marker.getPosition().lat();


Or if you want to display it in an InfoWindow of the marker, add and
open a infoWindow to the marker, which shows

         marker.getPosition().lat(); marker.getPosition().lng();

Hope I could imply something helpful. But I am not absolutly sure.
Perhaps someone with more google-maps expirience can tell you more than
me. Or maybe you should try on the Google Maps API google-group (
http://groups.google.com/group/google-maps-js-api-v3 )


--
best regards
Bente Pieck

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at