On Jan 9, 1:37 pm, JRiffe <[email protected]> wrote:
> On Jan 9, 3:13 pm, "[email protected]" <[email protected]>
> wrote:
>
>
> > On Jan 9, 12:47 pm, JRiffe <[email protected]> wrote:
>
> > > I have tried to do some reading up on this issue and it seems that you
> > > must geocode your addesses before the markers can be found?
>
> > > Here is my map.  Please choose 
> > > Oklahomahttp://va.birddogsw.com/states.aspx?Category=cacb9608-c6db-48b6-ba2f-...
>
> > > If you view source you will see the list of address that should be
> > > displaying (63 i believe).  On the map only 16 - 20 show and if you
> > > refresh the map, you get different points.
>
> > Is there some reason you can't use the HTTP geocoding service and
> > store the coordinates in whatever database you are storing the
> > addresses in?
>
> > > I read the tutorial about the map finding sites based on Lat and Long
> > > and which these could be generated using the .getLocations() instead
> > > of using .getLatLng().  However, if I'm needing to use
> > > the .getLocations for it to find multiple addresses.. how come it was
> > > finding multiple locations before I made that change?
>
> > > Is there a way that I can set center on the state w/o hard coding the
> > > lat and long?  Currently the map will set center on each point as it
> > > loads it.. which results in the map jumping around when it first
> > > loads.
>
> > Hard code a center point.  Calculate the dynamic one based on the
> > displayed markers once after all the markers have loaded.
>
> >   -- Larry
>
> > > Using Windows XP/IE7- Hide quoted text -
>
> > - Show quoted text -
>
> I asked the boss and he said that we can store the coordinates in the
> database.  Now, do I use the geo coder prior to even trying to load
> the map?  First geo code, then pull out the coordinates and plot
> markers based on those coordinates.  When I'm ready to load the map?

That is the best way to do it.  Create a script on the server that
uses the HTTP geocoder to store coordinates for the addresses and
geocode them off-line.  Add the coordinates to the data that you load
as part of the page.

> (Sorry, I know that is probably a trivial question, but I'm coming
> into pre existing code to try to figure it out)

There are a couple of tutorials that may help you referenced here:
http://code.google.com/support/bin/topic.py?topic=11364
Creating a Store Locator with PHP, MySQL & Google Maps
Using PHP/MySQL with Google Maps
Geocoding Addresses with PHP/MySQL

They talk about PHP/mySQL but the concepts should apply for you.


>
> "Hard code a center point.  Calculate the dynamic one based on the
> displayed markers once after all the markers have loaded. "
>
> How do I calculate the coordinates?
See this page in Mike Williams tutorial:
Part 14 Fitting the map zoom to the data
http://econym.org.uk/gmap/basic14.htm

In a nutshell, as you process the markers and add them to the map, add
them to an (originally empty) GLatLngBounds object:
bounds.extend(point)

Then after you have finished you can center and zoom the map with the
statement:

map.setCenter(bounds.getCenter­(),map.getBoundsZoomLevel(boun­ds));

  -- Larry


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to