On Aug 15, 4:12 pm, Daniel Montenegro <[email protected]> wrote:
> Hi there, Google Maps folks!
>
> Well, this is the question:
>
> Is there any diference between .getPosition() and .lat() .long() methods?

On what object?  The getPosition method typically returns a
google.maps.LatLng object.

A google.maps.LatLng object tends to have .lat() and .lng() methods
which return the floating point values of those coordinates.

>
> I need to have the marker coordinates on the screen as I click on it. So I
> thought in a event like this:
>
> google.maps.event.addListener(marker, 'click', function() {
>         document.getElementById('coords').value = marker.getPosition();
>     });

That should work assuming marker is defined as a google.maps.Marker
object and is in scope.

>
> To work along such a form:
>
> <input type="textbox" id="coords">
>
> But unfortunnelly, Firebug is giving me a message error, saying that marker
> is not defined.

That is an entirely different problem.  Most likely your "marker"
variable is not in the global scope (it is probably local to some
function).

  -- Larry

>
> Any help would be great!
>
> Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to