Ticket #2824 (closed feature: fixed)

Opened 3 years ago

Last modified 3 years ago

Add option to make Layer.WMS use IFrame tiles for URLs that are too long

Reported by: ahocevar Owned by: ahocevar
Priority: minor Milestone: 2.11 Release
Component: Tile.Image Version: 2.10 RC2
Keywords: Cc:
State: Complete

Description

We have Layer.WMS.Post already, but for layers where we e.g. set SLD_BODY to apply different styles, URLs may exceed the maximum length (2048 chars) only if a long SLD_BODY is set.

This ticket proposes to add an allowPost option to Tile.Image, so it can switch back and forth between IMG and IFRAME, depending on the URL length.

To make use of this, Layer.Grid gets a new tileOptions property, which will be passed to every tile instance we create.

Attachments

openlayers-2824.patch Download (30.7 KB) - added by ahocevar 3 years ago.
Tile.IFrame as mixin
openlayers-2824.2.patch Download (31.8 KB) - added by ahocevar 3 years ago.
with fixed tests

Change History

Changed 3 years ago by ahocevar

Tile.IFrame as mixin

  Changed 3 years ago by ahocevar

  • state set to Review

Patch with example. All tests pass. Thanks for any review.

  Changed 3 years ago by ahocevar

Instead of adding an allowPost option on the tile, this patch adds a maxGetUrlLength option. This makes things simpler and allows for more fine grained configuration.

  Changed 3 years ago by tschaub

Wow. This is a serious piece of work.

Code looks good and example works. But the Tile/IFrame tests are failing for me. I haven't looked closely, but it looks like the tests still need tweaking.

Changed 3 years ago by ahocevar

with fixed tests

  Changed 3 years ago by ahocevar

With attachment:openlayers-2824.2.patch Download, tests pass in Safari 5, Firefox 3.6 and IE 7. The reason for the failing tests in Firefox was the unsupportedBrowsers default setting in Layer.WMS.Post, which contains firefox, and would not give us IFrame tiles to play with.

Thanks for a follow-up review.

  Changed 3 years ago by tschaub

  • state changed from Review to Commit

Looks good. Thanks for the update and all the previous work on this.

My only (minor) comment is that I think it would be good to start always including and linking to an example js file. I've updated the coding standards page with a few points.

With or without this change, please commit.

Also, should the WMS.Post layer be deprecated?

  Changed 3 years ago by ahocevar

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

follow-up: ↓ 8   Changed 3 years ago by bartvde

Shouldn't we also update the SLDSelect control not to use the deprecated Layer.WMS.Post? If so, I can do that probably.

in reply to: ↑ 7   Changed 3 years ago by bartvde

Replying to bartvde:

Shouldn't we also update the SLDSelect control not to use the deprecated Layer.WMS.Post? If so, I can do that probably.

See ticket:2930

Note: See TracTickets for help on using tickets.