<p style="font-size:140%;margin-left: 10px">Use this slider to adjust the transparency of the Demographic Data Overlays:</p> <div id="theOpacitySlider" dojoType="dijit.form.HorizontalSlider" name="horizontal1" onChange="applyOpacity" value="40" maximum="100" minimum="0" discreteValues="11" pageIncrement="100" showButtons="false" intermediateChanges="false" slideDuration="500" style="width:290px; height: 20px;margin-left:auto;margin-right:auto" id="slider1"> <ol dojoType="dijit.form.HorizontalRuleLabels" container="topDecoration" style="height:1.2em;font-size:90%;font-weight:bold" count="6" numericMargin="0"></ol> <div dojoType="dijit.form.HorizontalRule" container="topDecoration" count=11 style="height:5px;"></div> <div id = "theOpacityRuler" dojoType="dijit.form.HorizontalRule" container="bottomDecoration" count=2 style="height:10px;"></div> <ol dojoType="dijit.form.HorizontalRuleLabels" container="bottomDecoration" style="height:1em;font-size:90%;font-style:italic"> <li>Solid</li> <li>Transparent</li> </ol> </div><br /> <table> <tr> <td><SPAN style="font-weight:bold">Current Transparency Setting: <input readonly id="sliderInput" size="2" value="40%" style="padding-left:5px"></SPAN></td> </tr> </table>
function applyOpacity() { var theAmount; theAmount = arguments[0]; theOpacity = 1 - (theAmount / 100); map.getLayer('your Layer ID here').setOpacity(theOpacity); }
dojo.require("dijit.form.HorizontalSlider"); dojo.require("dijit.form.HorizontalRuleLabels"); dojo.require("dijit.form.HorizontalRule");
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.