hi, i tried a similar thing a while back with a berkeleydb, just using
a url as the key and the image data as the value, and experienced
similar problems. though mine only occurred after the database had
10,000 or more images. i asked around and the general response seemed
to be: "well, you shouldnt be storing image data in a db".
modifying your tile.php to save to and get files from the filesystem
might be the best solution. you just have to make sure to keep the
number of files/ directory less than 5000 or access begins to slow.
kaMap's tile.php may be a good reference though perhaps overkill.
-brent
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
_______________________________________________
Geowanking mailing list
[EMAIL PROTECTED]
http://lists.burri.to/mailman/listinfo/geowanking