Unique Value Renderer webgl errors (Server 10.6.1, JS API 4.10)

529
2
Jump to solution
01-09-2019 11:27 AM
Jay_Gregory
Occasional Contributor III

I keep getting what looks like webgl errors iwhen trying to set a Unique Value Renderer to a MapService or FeatureService that is published to ArcGIS Server 10.6.1 (published with ArcMap 10.6.1)

Browser is Chrome 71.0.3578.98

I thought the dojoConfig esri-featurelayer-webgl would work for 10.6.1, as documentation says it would, but I'm very confused.  Can anyone help?

Errors point to Pipeline.js:

Errors

Here my some example code that reproduces the error (for me)

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
  <title>Intro to FeatureLayer - 4.10</title>
<script>
  var dojoConfig = {
    has: {
      "esri-featurelayer-webgl": 1
    }
  };
</script>
  <link rel="stylesheet" href="https://js.arcgis.com/4.10/esri/css/main.css">
  <script src="https://js.arcgis.com/4.10/"></script>

  <style>
    html,
    body,
    #viewDiv {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
    }
  </style>

  <script>
    require([
        "esri/Map",
        "esri/views/MapView",
        "esri/layers/FeatureLayer"
      ],
      function(
        Map, MapView,
        FeatureLayer
      ) {

        var map = new Map({
          basemap: "oceans"
        });

        var view = new MapView({
          container: "viewDiv",
          map: map,

          center: [-97, 38],
        zoom: 5
        });

        /********************
         * Add feature layer
         ********************/

        // Carbon storage of trees in Warren Wilson College.
          
           var defaultSymbol = {
        type: "simple-marker", // autocasts as new SimpleMarkerSymbol()
        size: 25,
        color: "rgba(111,111,111,.5)",
        outline: {
          // autocasts as new SimpleLineSymbol()
          width: 0.5,
          color: "black"
        }
      };
          var renderer = {
        type: "unique-value",
        field: "opsstatus",
        defaultSymbol: defaultSymbol,
        uniqueValueInfos: [
          {
            value: "Open",
            symbol: {
              type: "simple-fill", // autocasts as new SimpleFillSymbol()
              color: "green"
            }
          },
          {
            value: "Limited",
            symbol: {
              type: "simple-fill", // autocasts as new SimpleFillSymbol()
              color: "red"
            }
          }
        ]
      };
        var featureLayer = new FeatureLayer({
          url: "https://myserver/arcgis/rest/services/Development/testservice/FeatureServer/0", 
            renderer: renderer,
            outFields: ['*']
        });

        map.add(featureLayer);

      });
  </script>
</head>

<body>
  <div id="viewDiv"></div>
</body>

</html>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Jay,

  Your layer is a point layer but you are trying to use a simple fill symbol. That is your issue.

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Jay,

  Your layer is a point layer but you are trying to use a simple fill symbol. That is your issue.

Jay_Gregory
Occasional Contributor III

*foot in mouth*

thanks!  

0 Kudos