thanks guys, the links you sent me came up as virus sites and at my
office, I was not confortable viewing them.

I believe it was the advertising on the pages that create the warnings
and I keep getting many warnings from my server to stay away from
those sites.

So as for any help from those links, it was not helpful.


I did finally after many many 20 hour days (off and on, I bet I put
over 50 hours into this issue... maybe less.. I dont know)...

anyways... I had to get out of the box again (I was in) for the 10th
time and rethink this. I think I was a little inspired not by this
post, but by some others since I got into this google group. But I had
to write the code and figure out how to do it myself (I did not write
all the code myself of couse, the google api helped).

Anyways... I had to add another var to my database. I created a lat
and lng.
Then when I made the xml files, I checked to see if the lat and lng
already existed, if not it created them and wrote them to the xml
rather than when it was creating the map. There seems to be no problem
when you do it this way. Also, if it did have to find the lat and lng,
it wrote it back to the data base so next time it was not needed to do
it again. The code all took into account the 620 error (I did not
write that part).

Anyways... I had some other issues to work out (the appostrophe was a
b# because someone put a slanted apostrophe rather than a straight up
and down one. I did not even know there were two kinds. Anyways... I
was a silly error. There were some other issues with going back and
rewriting the code to work with this other way of doing it and other
misc fixes. But it does work now.

So .. again..
Step one, I created a lat lng in my original database and set it to
float. I allowed null and left it blank.
Step two, I updated the PHP to XML page that creates the data for the
map to check to see if there was a lat and log, and if not, it created
it.

Here is where I got that code... 
http://code.google.com/apis/maps/articles/phpsqlgeocode.html
... go down some...

here is part of my code, but you need to go back to the other page for
all the code.

        // Set up geocoding
        define("MAPS_HOST", "maps.google.com");
        define("KEY", "abcdefg");
        // Initialize delay in geocode speed
        $delay = 0;
        $base_url = "http://"; . MAPS_HOST . "/maps/geo?output=xml" .
"&key=" . KEY;

        // Successful geocode
        $geocode_pending = false;
        $coordinates = $xml->Response->Placemark->Point->coordinates;
        $coordinatesSplit = split(",", $coordinates);

        // Format: longitude, Latitude, Altitude
        $lat = $coordinatesSplit[1];
        $lng = $coordinatesSplit[0];

anyways... there) I updated the database so next time I dont need to
check for this info (saves a lot of server hits)
Then four) I pass the results with the xml and I removed the extra old
stuff I dont need anymore.
five, clean up my other code.

I might mention... I am going to update my data manager on the site to
allow for tweaking the lat and lng info.
I did notice some of the data is not very accurate (some homes ended
in the ocean) ... but the good news is... it finally works.

I hope I helped others on this issue.



On Jul 13, 10:42 am, "[email protected]" <[email protected]>
wrote:
> On Jul 13, 8:24 am, "[email protected]" <[email protected]>
> wrote:
>
>
>
> > On Jul 13, 8:01 am, Nathan <[email protected]> wrote:
>
> > > One of the problems I have having with that answer is everyone
> > > mentions that there is better ways to do this, but I have not found
> > > one with working examples. I have spent over 20 hours trying to figure
> > > out what I am doing wrong, and have nothing working yet. What is
> > > suppose to work, has not worked an produces no markers on the map.
>
> > The issue you are having is geocoding known addresses.   You need to
> > geocode them offline and store the latitude and longitude in your
> > database (as Rossko suggested).   You can certainly geocode them
> > inline like you are trying to do, but given the quotas and the "speed
> > limit" on geocoding, the page will take a really long time to load.
> > You need to get past this problem before it makes any sense to use the
> > marker manager or the clusterer solutions.
>
> > Examples of geocoding multiple 
> > addresses:http://www.geocodezip.com/example_geomulti_bad.asphttp://www.geocodez...
>
> >http://www.geocodezip.com/example_geomulti_bad2.asphttp://www.geocode...
>
> >http://www.geocodezip.com/example_geomulti_bad3_xml.asphttp://www.geo......
>
> And with your data (only one point can't be 
> geocoded):http://www.geocodezip.com/example_geomulti_bad3_xml.asp?filename=buil...
>
>    -- Larry
>
>
>
> > > specifically using the markerManger...
>
> > > // Add the array to the MarkerManager
> > > mgr.addMarkers(markers);
> > > // Refresh the MarkerManager to make the markers appear on the map
> > > mgr.refresh();
>
> > > That has not worked (I have played with the code for many hours, I
> > > dont understand what I did wrong).
>
> > > I understand that is the correct way to do this, but if it does not
> > > work, I cannot use 
> > > it.http://www.svennerberg.com/2009/01/handling-large-amounts-of-markers-...
>
> > > can you post (or anyone) specific examples of the correct way to do
> > > this.
>
> > > I will be posting anywhere from 5-100 markers at a time using a self
> > > created xml file on the fly (php).
>
> > > thank you.
> > > Nathan
>
> > > On Jul 10, 4:33 am, Rossko <[email protected]> wrote:
>
> > > > > I have seen a few posts on this issue, and I understand that Google
> > > > > will not allow you to pull to much mapping of markers all at ones. If
> > > > > I do 5 or less, it seems to work, if I do 10 I might get 5-9 of them,
> > > > > if I do 25, I get about half.
>
> > > > Just don't geocode multiple addresses over and over again, every time
> > > > someone looks at your page.  It's slow, error-prone and wasteful of
> > > > resources that other API users share with you.
>
> > > > Have a look at some of these 
> > > > -http://groups.google.com/group/Google-Maps-API/search?q=geomulti&star...
>
> > > > cheers, Ross K- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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