AnsweredAssumed Answered

Dim basemap

Question asked by scott@er on Jan 21, 2020
Latest reply on Jan 21, 2020 by rscheitlin

Hi, i'm following this example to map the boundary of my authority.  In my code below, i highlight the counties with a red border and dim the layer.  I would like to reverse the dim effect, instead, i would like the basemap to be dimmed and the feature layer not dimmed.


How can i achieve this effect?


I have followed this example, which dims the basemap, but it also dims my feature layer.  I don't want my feature layer to be dimmed, just everything that surrounds it.

Help setting opacity/transparency of Basemap 




Feature layer hover | ArcGIS API for JavaScript 3.31 


<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Feature Layer - display results as an InfoWindow onHover</title>
<link rel="stylesheet" href="">
<link rel="stylesheet" href="">
html, body, #mapDiv {
#mapDiv {
position: relative;
<script src=""></script>
var map, dialog;
"esri/map", "esri/layers/FeatureLayer",
"esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleLineSymbol",
"esri/renderers/SimpleRenderer", "esri/graphic", "esri/lang",
"esri/Color", "dojo/number", "dojo/dom-style",
"dijit/TooltipDialog", "dijit/popup", "dojo/domReady!"
], function(
Map, FeatureLayer,
SimpleFillSymbol, SimpleLineSymbol,
SimpleRenderer, Graphic, esriLang,
Color, number, domStyle,
TooltipDialog, dijitPopup
) {
map = new Map("mapDiv", {
basemap: "topo",
center: [-80.94, 33.646],
zoom: 8,
slider: false
var southCarolinaCounties = new FeatureLayer("", {
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: ["NAME", "POP2000", "POP2007", "POP00_SQMI", "POP07_SQMI"]
southCarolinaCounties.setDefinitionExpression("STATE_NAME = 'South Carolina'");
var symbol = new SimpleFillSymbol(
new SimpleLineSymbol(
new Color([255,0,0]), 2
new Color([125,125,125,0.25])

southCarolinaCounties.setRenderer(new SimpleRenderer(symbol));

map.on("load", function(){;

<body class="tundra">
<div id="mapDiv">