View previous topic :: View next topic |
Author |
Message |
hemmeter Smarty Rookie
Joined: 23 Aug 2006 Posts: 12 Location: California
|
Posted: Wed Aug 23, 2006 11:17 pm Post subject: Limit on Google Map markers? |
|
|
Hi, I am using GoogleMapAPI.class.php to render Google maps pages. It works fantastic when I have a small amount of markers to add (up to about 50). After that, the page will take a long time to load and usually result in a blank page.
I checked out the clusterer code (http://www.acme.com/javascript/#Clusterer) and wasn't able to get it to work properly. I am interested in help on getting that to work properly or recommendations for alternative solutions.
I am a bit above novice when it comes to PHP, but I have some coding background and am picking it up quickly.
Thanks in advance! |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Aug 24, 2006 1:32 am Post subject: |
|
|
googlemapapi shouldn't be any less capable than loading the markers directly with the google map javascript code.
I have put 500 markers on a google map before, it is a tad slower but not intolerable.
is your browser choking on the javascript? |
|
Back to top |
|
hemmeter Smarty Rookie
Joined: 23 Aug 2006 Posts: 12 Location: California
|
Posted: Thu Aug 24, 2006 5:23 am Post subject: |
|
|
The code I am running is gathering data from a websevice (salesforce.com) and processing each record it gets. It is a little slow to process and maybe that's the problem. Is it possible that PHP environments have a timeout limit on scripts? Processing 50 records or less works fine.
When the errors happen, it is as if the PHP script never finishes. However, it's inconsistent. I have successfully queried for and mapped each record in my dataset (in groups of 50), so I know that it's not a data issue. The issue happens when I get record counts above 60. It's as if the PHP script never finishes. I can't even do a view source on it. It's like nothing is there.
To be sure it's not the Google Maps class, I created a test file with 850 hardcoded $map->addMarkerByCoords calls. It was able to map them all.
So maybe my issue isn't with the GoogleMaps adapter. Any ideas, though? I don't know where to look to see if any errors are happening or whether it is timing out somehow. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Aug 24, 2006 7:34 am Post subject: |
|
|
hemmeter wrote: | Is it possible that PHP environments have a timeout limit on scripts? Processing 50 records or less works fine. |
Yes, and it is a fatal error when exceeded. It can be set either in your php.ini or on a script-by-script basis by using ini_set() (unless under PHP's safe-mode).
see: http://php.net/manual/en/ref.info.php#ini.max-execution-time
Try turning error reporting to E_ALL and setting make sure to either display errors or log them (all set in your php.ini -- you can also set them in your PHP script as needed) |
|
Back to top |
|
zfreidus Smarty n00b
Joined: 05 Nov 2006 Posts: 4 Location: Boca Raton, FL
|
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Nov 06, 2006 7:47 pm Post subject: |
|
|
There is nothing in GoogleMapsAPI that clears the lat/lon cache information. |
|
Back to top |
|
zfreidus Smarty n00b
Joined: 05 Nov 2006 Posts: 4 Location: Boca Raton, FL
|
Posted: Wed Nov 08, 2006 5:06 pm Post subject: Lat/long |
|
|
Mohrt,
Thanks for the reply. In further investigating this, I think that what is happening is that it is overwriting the entry each time instead of utilizing the vlaues stored from the previous time. Obviously this means that it has to query Yahoo every time, so the cache is essentially useless and just adds overhead. Do you have any idea why it doesn't find the record the second time I plot it? It is done systematically from a database so I know the address is formatted consistently.
Zev |
|
Back to top |
|
lindabassittpa Smarty Rookie
Joined: 05 Apr 2009 Posts: 6
|
|
Back to top |
|
|