Ticket #886 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

singleTile layers: size and resize issues

Reported by: ahocevar Owned by: euzuro
Priority: major Milestone: 2.5 Release
Component: Layer.WMS Version: SVN
Keywords: Cc:
State:

Description

There are two issues with the size of singleTile layers:

1) If layer.ratio is not an integer (like the default 1.5), css sizes may be non-integers, too. This is not tolerated by all browsers and will result in unexpected rendering results.

2) When the map is resized, the tile will keep its old dimensions, and new tiles will be requested with the old map size.

Attached is a patch that fixes these two issues.

Attachments

Grid.js.diff Download (1.4 KB) - added by ahocevar 6 years ago.
test_Grid.html.diff Download (1.2 KB) - added by ahocevar 6 years ago.
patch for the test file only

Change History

Changed 6 years ago by ahocevar

follow-up: ↓ 2   Changed 6 years ago by crschmidt

Agreed! Thanks for the patch -- Could you write a test for at least the first case in the Layer/test_Grid.html file? If you can't do it at the moment, I'll work on it when I get a chance.

WritingUnitTests might help.

in reply to: ↑ 1 ; follow-up: ↓ 3   Changed 6 years ago by ahocevar

Replying to crschmidt:

Agreed! Thanks for the patch -- Could you write a test for at least the first case in the Layer/test_Grid.html file? If you can't do it at the moment, I'll work on it when I get a chance.

Sorry, I can't do it before Thursday. I am struggling to get a project finished, and I stumbled across this bug by doing so.

in reply to: ↑ 2 ; follow-up: ↓ 4   Changed 6 years ago by crschmidt

Replying to ahocevar:

Replying to crschmidt:

Agreed! Thanks for the patch -- Could you write a test for at least the first case in the Layer/test_Grid.html file? If you can't do it at the moment, I'll work on it when I get a chance.

Sorry, I can't do it before Thursday. I am struggling to get a project finished, and I stumbled across this bug by doing so.

No problem. If you can't get to it, I'll do my best to get to it when I get a chance.

in reply to: ↑ 3   Changed 6 years ago by ahocevar

Replying to crschmidt:

Replying to ahocevar:

Replying to crschmidt:

Agreed! Thanks for the patch -- Could you write a test for at least the first case in the Layer/test_Grid.html file? If you can't do it at the moment, I'll work on it when I get a chance.

Sorry, I can't do it before Thursday. I am struggling to get a project finished, and I stumbled across this bug by doing so.

No problem. If you can't get to it, I'll do my best to get to it when I get a chance.

Ok, I had to think about something different than my project anyway. I did a short glance on the test file, and added a test for the first case. That was a matter of 5 minutes, and now back to the project...

Changed 6 years ago by ahocevar

patch for the test file only

  Changed 6 years ago by crschmidt

  • keywords review removed
  • status changed from new to closed
  • resolution set to fixed

Great, thanks :) Applied as r3861.

Note: See TracTickets for help on using tickets.