[OpenLayers-Users] misaligned kamap tiles

Ben Brehmer bbrehmer at refractions.net
Thu Aug 9 12:44:12 EDT 2007


Thanks Tim,

I've added this bug as a ticket ( http://trac.openlayers.org/ticket/899 )

In the meantime, if anyone else encounters this problem, they can add a 
line (to their kamap tile.php file) to check if the image path exists 
before opening it and return a single pixel image if an invalid path is 
supplied. This at least avoids displaying pink broken tiles.

Thanks again,

Ben


Tim Schaub wrote:
> Hey Ben-
>
> Ben Brehmer wrote:
>   
>> Hello All,
>>
>> I am in the process of converting a kamap application to use OpenLayers 
>> and in doing so have run into an occasional tile loading problem.
>>
>>     
>
> I've seen the problem you describe as well.  Can you make a ticket for 
> this in Trac?
>
> http://trac.openlayers.org/wiki/FilingTickets
>
> You can set me as the owner if you like.  It will likely not get 
> addressed before the 2.5 release - but I'll remember to look at it if 
> you put my name on it.
>
> Alternatively, if anybody else uses the ka-Map layer, any help is 
> appreciated in supporting it.
>
> Tim
>
>   
>> If you have a look at the attached screen shot you will see one valid 
>> tile (highlighted with firebug) and several broken (pink tiles).
>> The broken tiles are offset in the X and Y direction and are broken 
>> because they are referencing an invalid path in the kamap generated cache.
>>
>> Some other observations:
>> -All the broken tiles are always in the same row OR column
>> -The broken tiles always load after every single tile in the viewport 
>> has loaded successfully. (ie. an extra row/column is loaded with broken 
>> tiles)
>> -This is unrelated to the OpenLayers.IMAGE_RELOAD_ATTEMPTS setting since 
>> the tiles are broken due to a incorrect image path (not that they are 
>> failing to load on the first attempt)
>>
>> Any tips or possible leads would be greatly appreciated. I guess my main 
>> question is why would OpenLayers be trying to load extra columns/rows 
>> after all the columns/rows have already successfully loaded?
>>
>> Also,
>>
>> Thanks,
>>
>> Ben
>>
>> -----------------------
>> My map and layer setup:
>> --------------------------
>>  var options = {
>>    scales: [30000000, 15000000, 7500000, 4000000, 2000000, 750000, 
>> 400000, 200000, 125000, 75000, 35000, 17500, 12000, 7500],
>>    maxResolution: "auto",
>>    minResolution: "auto",
>>    units: 'm',
>>    maxExtent: MAX_EXTENTS,
>>    controls: [mouseEvents]
>>  };
>>
>> map = new OpenLayers.Map('ol_map', options);
>>
>>  layer_base = new OpenLayers.Layer.KaMap("Land",
>>                                                            
>> "http://brock.simplymap.com/kamap/tile.php",
>>                                                            {g: 
>> "__base__", map: "basemap.map", layers: "def", transparent: 'true', 
>> mapid: '0'},
>>                                                            {tileSize: 
>> new OpenLayers.Size(200,200), srs:'epsg:99999', format: "image/gif", 
>> Opacity: 0.3, isBaseLayer: true});
>>
>>
>>
>> !DSPAM:4033,46b71974171633327367457!
>>
>> ------------------------------------------------------------------------
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>> !DSPAM:4033,46b71974171633327367457!
>>     
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   




More information about the Users mailing list