CoastalResilienceNetwork / regional-planning

ArcGIS and WMS map layer plugin for the GeositeFramework
0 stars 2 forks source link

Fix Transparency Slider #74

Closed rajadain closed 7 years ago

rajadain commented 7 years ago

Overview

The previously used selector #layer-selector2-layer-menu-1 no longer exists, thus we use .layer-tools instead.

Furthermore, it was observed in #66 that opacity adjustments would make layers lighter, but not fainter:

image

By switching from png8 to png32 as the image format, we achieve true transparency:

image

Notes

At one point I was attempting to use CSS Opacity instead of ArcGIS options to set transparency. Unfortunately, all the layers from the same service are returned as a single image, and thus the CSS Opacity would apply to all layers in the image, not selectively. Thus, we have to use ArcGIS options.

I also found that I cannot simply set the layer to have a png32 image format when adding it, and it must be set on every interaction. Hopefully this doesn't affect our performance too much. For some background on this see https://geonet.esri.com/thread/89920#comment-622014

Testing Instructions

Ensure regional planning is installed in Geosite Framework and both have prototype branch checked out. Switch regional planning to this PR's branch. Ensure that the opacity sliders do change the opacity of the right layer, and don't affect any other layers. Ensure that the transparent layers can actually be seen through.

Connects #66 Connects #73