<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Set scale dependencies on rendered feature layer(s) in JavaScript 4.x in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506301#M47094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello-&lt;/P&gt;&lt;P&gt;I'm very green when it comes to Java. I am hoping someone can share a piece of code that will allow me to have a feature layers draw with symbolized trail when I cross a certain scale threshold. It seems this capability existed in JS 3.x but doesn't in 4.x. Any and all help is appreciated. Here's my code so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta charset="utf-8"&amp;gt;&lt;BR /&gt; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;ArcGIS JavaScript Tutorials: Create a Starter App&amp;lt;/title&amp;gt;&lt;BR /&gt; &amp;lt;style&amp;gt;&lt;BR /&gt; html, body, #viewDiv {&lt;BR /&gt; padding: 0;&lt;BR /&gt; margin: 0;&lt;BR /&gt; height: 100%;&lt;BR /&gt; width: 100%;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.12/esri/css/main.css"&amp;gt;&lt;BR /&gt; &amp;lt;script src="https://js.arcgis.com/4.12/"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;script&amp;gt; &lt;BR /&gt; require([&lt;BR /&gt; "esri/Map",&lt;BR /&gt; "esri/views/MapView",&lt;BR /&gt; "esri/layers/FeatureLayer",&lt;BR /&gt; "esri/widgets/Expand",&lt;BR /&gt; "esri/widgets/BasemapGallery",&lt;BR /&gt; "esri/widgets/Home",&lt;BR /&gt; ], function(Map, MapView, FeatureLayer, Expand, BasemapGallery, Home, Click) {&lt;/P&gt;&lt;P&gt;var map = new Map({&lt;BR /&gt; basemap: "topo-vector"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var view = new MapView({&lt;BR /&gt; container: "viewDiv",&lt;BR /&gt; map: map,&lt;BR /&gt; center: [-122.6226858,37.9449276], &lt;BR /&gt; zoom: 12&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; // Define a simple renderer and an image symbol&lt;BR /&gt; var trailheadsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "picture-marker",&lt;BR /&gt; url: "http://static.arcgis.com/images/Symbols/NPS/npsPictograph_0231b.png",&lt;BR /&gt; width: "18px",&lt;BR /&gt; height: "18px"&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; // Add labels&lt;BR /&gt; var trailheadsLabels = {&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "text",&lt;BR /&gt; color: "#000000",&lt;BR /&gt; haloColor: "#FFFFFF",&lt;BR /&gt; haloSize: "2px",&lt;BR /&gt; font: {&lt;BR /&gt; size: "10px",&lt;BR /&gt; family: "Verlag",&lt;BR /&gt; style: "regular",&lt;BR /&gt; weight: "bold"&lt;BR /&gt; }&lt;BR /&gt; },&lt;BR /&gt; labelPlacement: "above-center",&lt;BR /&gt; labelExpressionInfo: {&lt;BR /&gt; expression: "$feature.NAME"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; // Add all trails no use type symbology&lt;BR /&gt;var TrailsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line",&lt;BR /&gt; style: "solid",&lt;BR /&gt; color: "#2F5279",&lt;BR /&gt; width: "0.7px"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var Trails = new FeatureLayer({&lt;BR /&gt; url:&lt;BR /&gt; "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/ONETAM_TRANS_Trails_ln/FeatureServer/2",&lt;BR /&gt; renderer: TrailsRenderer,&lt;BR /&gt; &lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;map.add(Trails, 0);&lt;BR /&gt; &lt;BR /&gt; // Add hiking only trails&lt;BR /&gt; var hikeTrailsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line",&lt;BR /&gt; style: "short-dot",&lt;BR /&gt; color: "#2F5279",&lt;BR /&gt; width: "1px"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var hikeTrails = new FeatureLayer({&lt;BR /&gt; url:&lt;BR /&gt; "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/ONETAM_TRANS_Trails_ln/FeatureServer/2",&lt;BR /&gt; renderer: hikeTrailsRenderer,&lt;BR /&gt; definitionExpression: "TRLUSE = 'Hiker/Pedestrian'"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// map.add(hikeTrails, 0);&lt;BR /&gt; &lt;BR /&gt; // Add hiking/biking trails&lt;BR /&gt; var bikehikeTrailsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line",&lt;BR /&gt; style: "long-dash",&lt;BR /&gt; color: "#2F5279",&lt;BR /&gt; width: "1px"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var bikehikeTrails = new FeatureLayer({&lt;BR /&gt; url:&lt;BR /&gt; "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/ONETAM_TRANS_Trails_ln/FeatureServer/2",&lt;BR /&gt; renderer: bikehikeTrailsRenderer,&lt;BR /&gt; definitionExpression: "TRLUSE = 'Hiker/Pedestrian | Bicycle'"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// map.add(bikehikeTrails, 0);&lt;BR /&gt; &lt;BR /&gt; var horsehikeTrailsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line",&lt;BR /&gt; style: "dash-dot",&lt;BR /&gt; color: "#2F5279",&lt;BR /&gt; width: ".1px"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var horsehikeTrails = new FeatureLayer({&lt;BR /&gt; url:&lt;BR /&gt; "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/ONETAM_TRANS_Trails_ln/FeatureServer/2",&lt;BR /&gt; renderer: horsehikeTrailsRenderer,&lt;BR /&gt; definitionExpression: "TRLUSE = 'Hiker/Pedestrian | Pack and Saddle'"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// map.add(horsehikeTrails, 0);&lt;BR /&gt; &lt;BR /&gt; var muTrailsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line",&lt;BR /&gt; style: "short-dash",&lt;BR /&gt; color: "#2F5279",&lt;BR /&gt; width: "1px"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var muTrails = new FeatureLayer({&lt;BR /&gt; url:&lt;BR /&gt; "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/ONETAM_TRANS_Trails_ln/FeatureServer/2",&lt;BR /&gt; renderer: muTrailsRenderer,&lt;BR /&gt; definitionExpression: "TRLUSE = 'Hiker/Pedestrian | Pack and Saddle | Bicycle'"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// map.add(muTrails, 0);&lt;BR /&gt; &lt;BR /&gt; // Define a simple value renderer and symbols&lt;BR /&gt; var onetamareaRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-fill",&lt;BR /&gt; color: "#D5E5C8",&lt;BR /&gt; outline: {&lt;BR /&gt; width: 2,&lt;BR /&gt; color: "#4E663A"&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var onetamLayer = new FeatureLayer ({&lt;BR /&gt; url: "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/One_Tam_Area_of_Interest/FeatureServer/0",&lt;BR /&gt; renderer: onetamareaRenderer,&lt;BR /&gt; opacity: 0.5&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; map.add(onetamLayer, 0)&lt;BR /&gt; &lt;BR /&gt; // Define a popup for Trailheads&lt;BR /&gt; var popupTrailheads = {&lt;BR /&gt; "title": "Featured Hike",&lt;BR /&gt; "content": "&amp;lt;b&amp;gt;West Peak Loop&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;{HikeDesc}{HikeDesc2}{HikeDesc3}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Difficulty:&amp;lt;/b&amp;gt; {Difficulty}&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Length: &amp;lt;/b&amp;gt;{Length}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Amenities: &amp;lt;/b&amp;gt;{Amenities}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Get the Latest:&amp;lt;/b&amp;gt; {TheLatest2}"&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; // Create the layer and set the popup&lt;BR /&gt; var trailheads = new FeatureLayer({&lt;BR /&gt; url: "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/One_Tam_Featured_Hikes_Trailheads/FeatureServer/0",&lt;BR /&gt; outFields: ["HikeDesc","HikeDesc2","HikeDesc3","Difficulty","Length","Amenities", "TheLatest2"],&lt;BR /&gt; renderer: trailheadsRenderer,&lt;BR /&gt; labelingInfo: [trailheadsLabels],&lt;BR /&gt; popupTemplate: popupTrailheads&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; // Add the layer&lt;BR /&gt; map.add(trailheads);&lt;BR /&gt; &lt;BR /&gt; view.popup.watch("selectedFeature", function(graphic){&lt;BR /&gt; if(graphic.layer === trailheads){&lt;BR /&gt; view.popup.triggerAction(0);&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; // Create a BasemapGallery widget instance and set&lt;BR /&gt; // its container to a div element&lt;/P&gt;&lt;P&gt;var basemapGallery = new BasemapGallery({&lt;BR /&gt; view: view,&lt;BR /&gt; container: document.createElement("div")&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; // Create an Expand instance and set the content&lt;BR /&gt; // property to the DOM node of the basemap gallery widget&lt;BR /&gt; // Use an Esri icon font to represent the content inside&lt;BR /&gt; // of the Expand widget&lt;/P&gt;&lt;P&gt;var bgExpand = new Expand({&lt;BR /&gt; view: view,&lt;BR /&gt; content: basemapGallery&lt;BR /&gt; });&lt;BR /&gt; // close the expand whenever a basemap is selected&lt;BR /&gt; basemapGallery.watch("activeBasemap", function() {&lt;BR /&gt; var mobileSize =&lt;BR /&gt; view.heightBreakpoint === "xsmall" ||&lt;BR /&gt; view.widthBreakpoint === "xsmall";&lt;/P&gt;&lt;P&gt;if (mobileSize) {&lt;BR /&gt; bgExpand.collapse();&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; // Add the expand instance to the ui&lt;/P&gt;&lt;P&gt;view.ui.add(bgExpand, "top-right");&lt;BR /&gt; var homeBtn = new Home({&lt;BR /&gt; view: view&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// Add the home button to the top left corner of the view&lt;BR /&gt; view.ui.add(homeBtn, "top-left");&lt;BR /&gt; });&lt;BR /&gt; view.popup.watch("selectedFeature", function(graphic){&lt;BR /&gt; if(graphic.layer === trailheads){&lt;BR /&gt; view.popup.triggerAction(0); //This calls the popup Zoom To action&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;BR /&gt; &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Sep 2019 20:13:56 GMT</pubDate>
    <dc:creator>ZacStanley3</dc:creator>
    <dc:date>2019-09-03T20:13:56Z</dc:date>
    <item>
      <title>Set scale dependencies on rendered feature layer(s) in JavaScript 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506301#M47094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello-&lt;/P&gt;&lt;P&gt;I'm very green when it comes to Java. I am hoping someone can share a piece of code that will allow me to have a feature layers draw with symbolized trail when I cross a certain scale threshold. It seems this capability existed in JS 3.x but doesn't in 4.x. Any and all help is appreciated. Here's my code so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta charset="utf-8"&amp;gt;&lt;BR /&gt; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;ArcGIS JavaScript Tutorials: Create a Starter App&amp;lt;/title&amp;gt;&lt;BR /&gt; &amp;lt;style&amp;gt;&lt;BR /&gt; html, body, #viewDiv {&lt;BR /&gt; padding: 0;&lt;BR /&gt; margin: 0;&lt;BR /&gt; height: 100%;&lt;BR /&gt; width: 100%;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.12/esri/css/main.css"&amp;gt;&lt;BR /&gt; &amp;lt;script src="https://js.arcgis.com/4.12/"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;script&amp;gt; &lt;BR /&gt; require([&lt;BR /&gt; "esri/Map",&lt;BR /&gt; "esri/views/MapView",&lt;BR /&gt; "esri/layers/FeatureLayer",&lt;BR /&gt; "esri/widgets/Expand",&lt;BR /&gt; "esri/widgets/BasemapGallery",&lt;BR /&gt; "esri/widgets/Home",&lt;BR /&gt; ], function(Map, MapView, FeatureLayer, Expand, BasemapGallery, Home, Click) {&lt;/P&gt;&lt;P&gt;var map = new Map({&lt;BR /&gt; basemap: "topo-vector"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var view = new MapView({&lt;BR /&gt; container: "viewDiv",&lt;BR /&gt; map: map,&lt;BR /&gt; center: [-122.6226858,37.9449276], &lt;BR /&gt; zoom: 12&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; // Define a simple renderer and an image symbol&lt;BR /&gt; var trailheadsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "picture-marker",&lt;BR /&gt; url: "http://static.arcgis.com/images/Symbols/NPS/npsPictograph_0231b.png",&lt;BR /&gt; width: "18px",&lt;BR /&gt; height: "18px"&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; // Add labels&lt;BR /&gt; var trailheadsLabels = {&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "text",&lt;BR /&gt; color: "#000000",&lt;BR /&gt; haloColor: "#FFFFFF",&lt;BR /&gt; haloSize: "2px",&lt;BR /&gt; font: {&lt;BR /&gt; size: "10px",&lt;BR /&gt; family: "Verlag",&lt;BR /&gt; style: "regular",&lt;BR /&gt; weight: "bold"&lt;BR /&gt; }&lt;BR /&gt; },&lt;BR /&gt; labelPlacement: "above-center",&lt;BR /&gt; labelExpressionInfo: {&lt;BR /&gt; expression: "$feature.NAME"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; // Add all trails no use type symbology&lt;BR /&gt;var TrailsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line",&lt;BR /&gt; style: "solid",&lt;BR /&gt; color: "#2F5279",&lt;BR /&gt; width: "0.7px"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var Trails = new FeatureLayer({&lt;BR /&gt; url:&lt;BR /&gt; "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/ONETAM_TRANS_Trails_ln/FeatureServer/2",&lt;BR /&gt; renderer: TrailsRenderer,&lt;BR /&gt; &lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;map.add(Trails, 0);&lt;BR /&gt; &lt;BR /&gt; // Add hiking only trails&lt;BR /&gt; var hikeTrailsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line",&lt;BR /&gt; style: "short-dot",&lt;BR /&gt; color: "#2F5279",&lt;BR /&gt; width: "1px"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var hikeTrails = new FeatureLayer({&lt;BR /&gt; url:&lt;BR /&gt; "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/ONETAM_TRANS_Trails_ln/FeatureServer/2",&lt;BR /&gt; renderer: hikeTrailsRenderer,&lt;BR /&gt; definitionExpression: "TRLUSE = 'Hiker/Pedestrian'"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// map.add(hikeTrails, 0);&lt;BR /&gt; &lt;BR /&gt; // Add hiking/biking trails&lt;BR /&gt; var bikehikeTrailsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line",&lt;BR /&gt; style: "long-dash",&lt;BR /&gt; color: "#2F5279",&lt;BR /&gt; width: "1px"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var bikehikeTrails = new FeatureLayer({&lt;BR /&gt; url:&lt;BR /&gt; "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/ONETAM_TRANS_Trails_ln/FeatureServer/2",&lt;BR /&gt; renderer: bikehikeTrailsRenderer,&lt;BR /&gt; definitionExpression: "TRLUSE = 'Hiker/Pedestrian | Bicycle'"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// map.add(bikehikeTrails, 0);&lt;BR /&gt; &lt;BR /&gt; var horsehikeTrailsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line",&lt;BR /&gt; style: "dash-dot",&lt;BR /&gt; color: "#2F5279",&lt;BR /&gt; width: ".1px"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var horsehikeTrails = new FeatureLayer({&lt;BR /&gt; url:&lt;BR /&gt; "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/ONETAM_TRANS_Trails_ln/FeatureServer/2",&lt;BR /&gt; renderer: horsehikeTrailsRenderer,&lt;BR /&gt; definitionExpression: "TRLUSE = 'Hiker/Pedestrian | Pack and Saddle'"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// map.add(horsehikeTrails, 0);&lt;BR /&gt; &lt;BR /&gt; var muTrailsRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-line",&lt;BR /&gt; style: "short-dash",&lt;BR /&gt; color: "#2F5279",&lt;BR /&gt; width: "1px"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var muTrails = new FeatureLayer({&lt;BR /&gt; url:&lt;BR /&gt; "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/ONETAM_TRANS_Trails_ln/FeatureServer/2",&lt;BR /&gt; renderer: muTrailsRenderer,&lt;BR /&gt; definitionExpression: "TRLUSE = 'Hiker/Pedestrian | Pack and Saddle | Bicycle'"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// map.add(muTrails, 0);&lt;BR /&gt; &lt;BR /&gt; // Define a simple value renderer and symbols&lt;BR /&gt; var onetamareaRenderer = {&lt;BR /&gt; type: "simple",&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-fill",&lt;BR /&gt; color: "#D5E5C8",&lt;BR /&gt; outline: {&lt;BR /&gt; width: 2,&lt;BR /&gt; color: "#4E663A"&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var onetamLayer = new FeatureLayer ({&lt;BR /&gt; url: "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/One_Tam_Area_of_Interest/FeatureServer/0",&lt;BR /&gt; renderer: onetamareaRenderer,&lt;BR /&gt; opacity: 0.5&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; map.add(onetamLayer, 0)&lt;BR /&gt; &lt;BR /&gt; // Define a popup for Trailheads&lt;BR /&gt; var popupTrailheads = {&lt;BR /&gt; "title": "Featured Hike",&lt;BR /&gt; "content": "&amp;lt;b&amp;gt;West Peak Loop&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;{HikeDesc}{HikeDesc2}{HikeDesc3}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Difficulty:&amp;lt;/b&amp;gt; {Difficulty}&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Length: &amp;lt;/b&amp;gt;{Length}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Amenities: &amp;lt;/b&amp;gt;{Amenities}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Get the Latest:&amp;lt;/b&amp;gt; {TheLatest2}"&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; // Create the layer and set the popup&lt;BR /&gt; var trailheads = new FeatureLayer({&lt;BR /&gt; url: "https://services9.arcgis.com/D49vnq4lqWmKCLj0/arcgis/rest/services/One_Tam_Featured_Hikes_Trailheads/FeatureServer/0",&lt;BR /&gt; outFields: ["HikeDesc","HikeDesc2","HikeDesc3","Difficulty","Length","Amenities", "TheLatest2"],&lt;BR /&gt; renderer: trailheadsRenderer,&lt;BR /&gt; labelingInfo: [trailheadsLabels],&lt;BR /&gt; popupTemplate: popupTrailheads&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; // Add the layer&lt;BR /&gt; map.add(trailheads);&lt;BR /&gt; &lt;BR /&gt; view.popup.watch("selectedFeature", function(graphic){&lt;BR /&gt; if(graphic.layer === trailheads){&lt;BR /&gt; view.popup.triggerAction(0);&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; // Create a BasemapGallery widget instance and set&lt;BR /&gt; // its container to a div element&lt;/P&gt;&lt;P&gt;var basemapGallery = new BasemapGallery({&lt;BR /&gt; view: view,&lt;BR /&gt; container: document.createElement("div")&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; // Create an Expand instance and set the content&lt;BR /&gt; // property to the DOM node of the basemap gallery widget&lt;BR /&gt; // Use an Esri icon font to represent the content inside&lt;BR /&gt; // of the Expand widget&lt;/P&gt;&lt;P&gt;var bgExpand = new Expand({&lt;BR /&gt; view: view,&lt;BR /&gt; content: basemapGallery&lt;BR /&gt; });&lt;BR /&gt; // close the expand whenever a basemap is selected&lt;BR /&gt; basemapGallery.watch("activeBasemap", function() {&lt;BR /&gt; var mobileSize =&lt;BR /&gt; view.heightBreakpoint === "xsmall" ||&lt;BR /&gt; view.widthBreakpoint === "xsmall";&lt;/P&gt;&lt;P&gt;if (mobileSize) {&lt;BR /&gt; bgExpand.collapse();&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; // Add the expand instance to the ui&lt;/P&gt;&lt;P&gt;view.ui.add(bgExpand, "top-right");&lt;BR /&gt; var homeBtn = new Home({&lt;BR /&gt; view: view&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// Add the home button to the top left corner of the view&lt;BR /&gt; view.ui.add(homeBtn, "top-left");&lt;BR /&gt; });&lt;BR /&gt; view.popup.watch("selectedFeature", function(graphic){&lt;BR /&gt; if(graphic.layer === trailheads){&lt;BR /&gt; view.popup.triggerAction(0); //This calls the popup Zoom To action&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;BR /&gt; &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 20:13:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506301#M47094</guid>
      <dc:creator>ZacStanley3</dc:creator>
      <dc:date>2019-09-03T20:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale dependencies on rendered feature layer(s) in JavaScript 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506302#M47095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zac,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#maxScale" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html#maxScale"&gt;You can set the minScale and maxScale for your layers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You&amp;nbsp;could add multiple layers with different symbologies that display at different scales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore, here is a sample that changes symbology based on scale:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/visualization-heatmap-scale/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/visualization-heatmap-scale/index.html"&gt;Create a scale-dependent visualization | ArcGIS API for JavaScript 4.12&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 21:11:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506302#M47095</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2019-09-03T21:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale dependencies on rendered feature layer(s) in JavaScript 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506303#M47096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ben-&lt;/P&gt;&lt;P&gt;I tried the cloning approach but got tuck when changing the mapView - I will try the min and max scale and report back. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 21:15:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506303#M47096</guid>
      <dc:creator>ZacStanley3</dc:creator>
      <dc:date>2019-09-03T21:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale dependencies on rendered feature layer(s) in JavaScript 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506304#M47097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a short sample that shows switching layers based on the scale:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/benesri/pen/MWgOYjy" title="https://codepen.io/benesri/pen/MWgOYjy"&gt;https://codepen.io/benesri/pen/MWgOYjy&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zoom in to switch.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 21:33:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506304#M47097</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2019-09-03T21:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale dependencies on rendered feature layer(s) in JavaScript 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506305#M47098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ben,&lt;/P&gt;&lt;P&gt;Thank you so much. Will explore.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 21:40:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506305#M47098</guid>
      <dc:creator>ZacStanley3</dc:creator>
      <dc:date>2019-09-03T21:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale dependencies on rendered feature layer(s) in JavaScript 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506306#M47099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This link shows the scale for each level of zoom:&amp;nbsp;&lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/products/product/mapping/web-map-zoom-levels-updated/" title="https://www.esri.com/arcgis-blog/products/product/mapping/web-map-zoom-levels-updated/"&gt;Web map zoom levels&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 22:53:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506306#M47099</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2019-09-03T22:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale dependencies on rendered feature layer(s) in JavaScript 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506307#M47100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ben! I was able to use min and max scale to solve my problem!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 13:07:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-scale-dependencies-on-rendered-feature-layer-s/m-p/506307#M47100</guid>
      <dc:creator>ZacStanley3</dc:creator>
      <dc:date>2019-09-04T13:07:09Z</dc:date>
    </item>
  </channel>
</rss>

