Sending coordinates to input instead of div?

15 views
Skip to first unread message

Mike Norris

unread,
Jun 18, 2011, 12:53:25 AM6/18/11
to google-map...@googlegroups.com
Hi,

I found a map demo that does almost exactly what I am hoping for; it allows you to click and drag OR input an address and it populates the lat/lng in a div.  The demo is perfect, but I would like to achieve one additional thing: rather than the coordinates populating a div, I'd like them to populate an input.

I did try changing the id of the input to match that of the div (and removed the div,) but honestly, that was just a random guess on how to proceed with it.  I'm more of a PHP guy and used to having to do all the processing beforehand, rather than in the DOM.

Is there a simple solution to this?

Thanks so much for any insight.

Mike

geoco...@gmail.com

unread,
Jun 18, 2011, 9:47:55 AM6/18/11
to Google Maps JavaScript API v3
On Jun 17, 9:53 pm, Mike Norris <mike.allen.nor...@gmail.com> wrote:
> Hi,
>
> I found a map demo<http://gmaps-samples-v3.googlecode.com/svn/trunk/geocoder/getlatlng.html>that does almost exactly what I am hoping for; it allows you to click and
Doesn't seem to have anything to do with the Google Maps JavaScript
API v3 (other than that is where you got the example). Google is your
friend:
http://www.google.com/search?client=gmail&rls=gm&q=set%20input%20javascript

-- Larry

>
> Mike

Chris Broadfoot

unread,
Jun 18, 2011, 11:01:30 AM6/18/11
to google-map...@googlegroups.com
See these docs:

Basically, on an <input>, don't set the innerHTML, set the value.

--



--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/EQwjnRmvBpkJ.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply all
Reply to author
Forward
0 new messages