Opened 12 years ago

Closed 12 years ago

#169 closed enhancement (fixed)

Allow passing in OL Layer options from MapBook

Reported by: jimk Owned by: jimk
Priority: major Milestone: 2.6.1
Component: GeoMOOSE/JS Version: 2.6
Keywords: Cc: theduckylittle

Description

The specific problem is the need to tweak the buffer and ratio options for tiled="true" (not necessarily TMS) layers to improve the user experience. (Note: There is a regression here compared to the default settings in 2.4 that make these layers feel less responsive in 2.6).

I propose this is solved more flexibly by using <option name="..." value="..."/> in the mapbook and use similar code to parse and pass the options in as is currently done with <param/>.

Another (not mutually exclusive) possibility would be to define a default options hash in the configuration section to allow someone wanted to apply the some options to all layers.

A concern here is while this adds a lot of flexibility it makes the mapbook dependent on OpenLayers changes. To avoid this, I think we let all options through, but we only support (as in will work to maintain an upgrade path for) options we specifically document.

Change History (6)

comment:1 by theduckylittle, 12 years ago

The way we have been doing this in the past is by using the attributes of the layer to expose the appropriate options. I think that provides a better balance because we can predict and test the options the users could be changing.

in reply to:  1 comment:2 by jimk, 12 years ago

Replying to theduckylittle:

The way we have been doing this in the past is by using the attributes of the layer to expose the appropriate options. I think that provides a better balance because we can predict and test the options the users could be changing.

I know... it sort of bugs me to treat it so differently when it is really the same sort of thing behind the scenes, but it doesn't bug me enough to argue over it... So, in that case, we need to add at least ratio and buffer.

comment:3 by jimk, 12 years ago

Using Duck's way:

Add support for parsing <map-source buffer="" ratio="" .../> in WMS, TMS, (and potentially MapServer and XYZ if they don't inherit the fix from WMS/TMS.)

comment:4 by jimk, 12 years ago

Owner: set to jimk
Status: newassigned

Note: buffer was already used in the mapbook to mean ratio in single tile WMS cases. To avoid changing that (and introducing an incompatibility with existing installs) I overloaded the buffer= attribute on <map-source/> to modify buffer (for tiled/gridded WMS and for TMS layers) and retained buffer= setting ratio for <map-source singleTile="true" type="wms" .../>.

r937

comment:5 by jimk, 12 years ago

Status: assignedtesting

comment:6 by theduckylittle, 12 years ago

Resolution: fixed
Status: testingclosed
Note: See TracTickets for help on using tickets.