Geocoding multiple addresses with automatic zoom and center

216 views
Skip to first unread message

JS Beginner

unread,
Jun 28, 2011, 2:16:55 PM6/28/11
to google-map...@googlegroups.com
Hi all,

I've seen many tutorials that do partly what I need, but I havn't been able to make everything work together.

So, I would like to geocode a set of 10 addresses and display the corresponding markers on a map with automatic zoom and center.

It would be great to customize the markers.

Do you know any tutorial explaining all this, step by step ? I am a JS beginner.

Thank you all

geoco...@gmail.com

unread,
Jun 28, 2011, 2:40:36 PM6/28/11
to Google Maps JavaScript API v3
On Jun 28, 11:16 am, JS Beginner <nhaou...@gmail.com> wrote:
> Hi all,
>
> I've seen many tutorials that do partly what I need, but I havn't been able
> to make everything work together.
>
> So, I would like to geocode a set of 10 addresses and display the
> corresponding markers on a map with automatic zoom and center.

I would suggest geocoding them manually, then displaying the markers
based on the coordinates.

Example page to manually geocode them:
from the documentation:
http://code.google.com/apis/maps/documentation/javascript/examples/geocoding-simple.html
one of mine:
http://www.geocodezip.com/example_geo2.asp

>
> It would be great to customize the markers.

Example displaying pre-geocoded markers with custom markers:
http://www.geocodezip.com/v3_GenericMapBrowser.asp?filename=F18CrashSite081208.xml

-- Larry

JS Beginner

unread,
Jun 28, 2011, 3:07:59 PM6/28/11
to google-map...@googlegroups.com
Thank you for your reply, but I cannot geocode manually.

Actualy, the 10 addresses are extracted via Ajax from an external API in response to a user query.

There are thousands of possible results.

=> I cannot store geocodes.

Marie Alm

unread,
Jul 4, 2011, 1:46:48 AM7/4/11
to google-map...@googlegroups.com
Hello -

I have something similar. I will need to display approx. 2000 locations on a USA map. The user will input their data into a form and it is stored in a database. I have the map showing on the page now (formatting not all done but here is the url http://www.spiritof45.org/subsites/svdev/other/events_listings.php) but not yet the overlay. Isn't there an "automated" way to get lat and long given a city name and state?  Ultimately, I will want to do other maps for other Locators on our website.

Thanks.
Marie.

geoco...@gmail.com

unread,
Jul 4, 2011, 9:07:51 AM7/4/11
to Google Maps JavaScript API v3
On Jul 3, 10:46 pm, Marie Alm <spirit45i...@gmail.com> wrote:
> Hello -
>
> I have something similar. I will need to display approx. 2000 locations on a
> USA map. The user will input their data into a form and it is stored in a
> database. I have the map showing on the page now (formatting not all done
> but here is the urlhttp://www.spiritof45.org/subsites/svdev/other/events_listings.php) but not
> yet the overlay. *Isn't there an "automated" way to get lat and long given a
> city name and state?*  Ultimately, I will want to do other maps for other
> Locators on our website.

Have you seen this:
http://code.google.com/apis/maps/articles/geocodestrat.html

(from "Articles" in the v3 documentation)

-- Larry

>
> Thanks.
> Marie.
Reply all
Reply to author
Forward
0 new messages