> I used the code provided under Geocoding Responses (below).
> My question is, how do I modify this code so that on each dynamic
> rails page, it shows the map for the db address shown?

Have a look at how the code works, then make the small changes needed.
In the example, the geocoding function is run from a click.
You'd want to run it automatically after the map is loaded.
In the example, the function gets its target address from an HTML
element.
You'd want to change that to get the address from wherever you made
your server-side code put it on the page, a hidden element perhaps.

As a general strategy, geocoding known addresses from your database
every time someone looks at the webpage is a dumb idea.  Geocoding
once ahead of time and storing the coords, allows you to correct any
oddities or inaccuracies the geocoder may give you, and makes your pge
faster and more reliable.

-- 
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 google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to