Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Limit on Google Map markers?

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
hemmeter
Smarty Rookie


Joined: 23 Aug 2006
Posts: 12
Location: California

PostPosted: Wed Aug 23, 2006 11:17 pm    Post subject: Limit on Google Map markers? Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7365
Location: Lincoln Nebraska, USA

PostPosted: Thu Aug 24, 2006 1:32 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
hemmeter
Smarty Rookie


Joined: 23 Aug 2006
Posts: 12
Location: California

PostPosted: Thu Aug 24, 2006 5:23 am    Post subject: Reply with quote

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
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Aug 24, 2006 7:34 am    Post subject: Reply with quote

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
View user's profile Send private message
zfreidus
Smarty n00b


Joined: 05 Nov 2006
Posts: 4
Location: Boca Raton, FL

PostPosted: Sun Nov 05, 2006 6:30 pm    Post subject: GoogleMapAPI.class.php extremely slow Reply with quote

I'm using GoogleMapAPI.class.php and it is very very slow. I only plot a maximum of 10 records at a time. If I remove the maps, the page loads instantly. Here is an example of the same page, same database query with and without the maps.

With Maps - http://www.bocaexecutiverealty.com/real_estate/Wellington/Palm_Beach_Polo.php

Without Maps - http://www.bocaexecutiverealty.com/search.php?Type=S&City=Wellington&sPrice=250000&ePrice=99999999999&pool=d&water=d&Bedrooms=0&Bathrooms=0&Development=Palm%20Beach%20Polo

Also, it seems that the cache of lat/long values gets cleared periodically. Does anyone know how to increase that interval?

Zev
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7365
Location: Lincoln Nebraska, USA

PostPosted: Mon Nov 06, 2006 7:47 pm    Post subject: Reply with quote

There is nothing in GoogleMapsAPI that clears the lat/lon cache information.
Back to top
View user's profile Send private message Visit poster's website
zfreidus
Smarty n00b


Joined: 05 Nov 2006
Posts: 4
Location: Boca Raton, FL

PostPosted: Wed Nov 08, 2006 5:06 pm    Post subject: Lat/long Reply with quote

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
View user's profile Send private message Visit poster's website
lindabassittpa
Smarty Rookie


Joined: 05 Apr 2009
Posts: 6

PostPosted: Sun Apr 05, 2009 10:53 pm    Post subject: Reply with quote

I have the same problem: here is an example with maps:
http://www.lindabassitt.idxco.com/idx/4264/mapSearch.php

and one without maps:
http://www.lindabassitt.idxco.com/idx/4264/basicSearch.php
the difference is notable.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP