We would probably need to see the running app to give an better answer.
However one thing that springs to mind is the number of mysql connections.
If your mysql server can only handle a certain number of requests at a time
then it might fail on some requests, if there are many been made at the
'same' time - which could happen when loading a load of tiles.
Personally I would recommend storing the tiles in the file system anyway as
that should allow the webserver to handle caching headers so that the tiles
can be cached by users to speed up loading. Alternatively you can implement
the caching headers could be implemented in your php code to reach the same
effect.
On 4/13/07, Barbara Hui <[EMAIL PROTECTED]> wrote:
Hi all - We are developing a mash-up that uses the google maps API along
with
custom map tiles we have generated in-house. The problem is weird:
when the tiles are stored as-is on the server, and retrieved via full
pathname, they load perfectly. But when the files are loaded into a
MySQL database (into a blob type field), and are retrieved via a SQL
statement, then all of a sudden some tiles in the middle of the map (a
horizontal middle band) are missing.
The tile images (png) are definitely in the database. I am able to
display all of them in a browser individually via PHP/MySQL. It seems
to be something about going via the Google API that causes the
problem. The top and bottom row(s) of tiles load fine, but the inner
tiles, so to speak, are blank. There is no "We are sorry, but we
don't have maps at this zoom level for this region" message displayed--
nothing. It is as though the png file has been retrieved from the
database, but it is blank.
Any and all hints greatly appreciated!! (I've already searched this
board and haven't found anything that seems to fit our problem. Also,
let me know if you'd like more code....)
Here is the portion of the javascript that is in question:
CustomGetTileUrl=function(a,b)
{
var aMap = "tile.php?action=get&year="+ mapYear +"&z="+ b+ "&y="
+ a.x + "&x=" + a.y;
//replace the line of code above with the line of code below, and
the map tiles display correctly
//var aMap = "googleMaps/"+ mapYear +"/"+ b+ "/" + a.x + "/" +
a.y + ".png";
return aMap ;
}
Here is the portion of tile.php in question:
/*** value of $id constructed out of parameters passed in ... ***/
$result = mysql_query("select * from hm_map_tiles where tile_id='".
$id."'") or die (mysql_error());
$row = mysql_fetch_assoc($result);
_______________________________________________
Geowanking mailing list
[EMAIL PROTECTED]
http://lists.burri.to/mailman/listinfo/geowanking
--
Barry
- www.nearby.org.uk - www.geograph.org.uk -
_______________________________________________
Geowanking mailing list
[EMAIL PROTECTED]
http://lists.burri.to/mailman/listinfo/geowanking