Opened 11 years ago

Closed 11 years ago

#828 closed defect (fixed) handles empty parts wrong

Reported by: Dirk Stoecker Owned by: streetmap@…
Priority: minor Milestone:
Component: osmarender Version:
Keywords: Cc:


E.g. when you look at there is an empty square part left of "Großdrebnitz".

This is an area, which is totally empty and drawn totally white, but the normal background is a light grey.

Same for left beside Schulzendorf.

Solution: For empty tiles use the same light grey color.

Change History (8)

comment:1 Changed 11 years ago by Tom Hughes

Component: adminosmarender
Resolution: worksforme
Status: newclosed

It would be a lot easier to investigate if you had given links to the slippy map instead of the MapOf? service where I can't poke at the tile URLs with FireBug?... For the record the corresponding location on the slippymap is:

and the problem tile appears to be:

the only problem is that it seems to be fine for me - the server is returning a grey tile that matches the adjacent tiles.

comment:2 Changed 11 years ago by Dirk Stoecker

Resolution: worksforme
Status: closedreopened

Your right. The problem does not appear in

But it appears in Giving you the link to the slippy map wouldn't have helped, as there the problem does not exist.

Seems you searched at the wrong place. Maybe it's a bug in MapOf? scripting. Don't know. But I know there are white patches in the maps, which you can verify yourself, when loading the links I gave.

comment:3 Changed 11 years ago by Tom Hughes

Owner: changed from Tom Hughes to streetmap@…
Status: reopenednew

I just find it very hard to believe that this is MapOf? specific - all that does is fetch the tiles and stitch them together, and there doesn't seem to be anything special about that tile.

comment:4 Changed 11 years ago by Dirk Stoecker

Looking at the mapof script:

60 	      if(file_exists($Filename)){
61 	        $ToX = (floor($Width/2) - $XA + $xi * $Tilesize);
62 	        $ToY = (floor($Height/2) - $YA + $yi * $Tilesize);
64 	        if($ToX > -$Tilesize && $ToX < $Width
65 	          && $ToY > -$Tilesize && $ToY < $Height){
66 	          $Part = imagecreatefrompng($Filename);
67 	          imagecopy($Image, $Part,
68 	            $ToX,
69 	            $ToY,
70 	            0, 0,
71 	            $Tilesize, $Tilesize);
72 	          }
73 	        }[

Probably the problem here is, that in case file does not exists, the area must be cleared.

Or in line 46

46 	  imagefilledrectangle($Image, 0,0,$Width, $Height, $BG);

set the correct background color and save the work for non-existing tiles.

osmarender for sure is the wrong component, but I do not know better, that's why I choose admin.

comment:5 Changed 11 years ago by Dirk Stoecker

Line 45 I meant

45 	  $BG = imagecolorallocate($Image, 255, 255, 255);

When you change that to 248,248,248 the problem should be solved.

BTW: Could the width/height limit be increased from 2000 to 3500? That would be 300dpi for A4 paper.

comment:6 Changed 11 years ago by Tom Hughes

The point is that the file does exist - I posted the URL for it!

comment:7 Changed 11 years ago by Dirk Stoecker

You're really sure?

As I see the scripts run on the same server and mapof directly accesses the files.

Are empty tiles really stored, or is there a list containing empty tiles and send default tile for these? In the second case they are not physical reachable and the mapof test will fail, whereas the server delivers a default tile. Thought this is only speculation, as I had no deep look into the server working mechanisms. But it is the way I would design it :-)

comment:8 Changed 11 years ago by tomhughes

Resolution: fixed
Status: newclosed

(In [7351]) Change background colour to match T@H tiles. Closes #828.

Note: See TracTickets for help on using tickets.