[Geowanking] missing google maps custom tiles when retrieving from MySQL database

Gregor J. Rothfuss gregor at apache.org
Fri Apr 13 09:34:15 PDT 2007


there is an official google maps api group at

http://groups.google.com/group/Google-Maps-API

i have cc'd pamela, who might be able to help you as well, but please 
also use the group above.

Barbara Hui 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
> Geowanking at lists.burri.to
> http://lists.burri.to/mailman/listinfo/geowanking




More information about the Geowanking mailing list