AnsweredAssumed Answered

SimpleMarkerSymbol no longer formats outline style in 4.10

Question asked by glennerion on Feb 22, 2019
Latest reply on Feb 25, 2019 by rscheitlin

In 4.9, the following code creates a circle with a green dotted line as the outline when the map is clicked. In 4.10, it ignores:

style: "short-dot"

 

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
  <title>Intro to ArcGIS API for JavaScript</title>
  <style>
    html,
    body,
    #viewDiv {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
    }
  </style>
  <link rel="stylesheet" href="https://js.arcgis.com/4.3/esri/css/main.css">
  <script src="https://js.arcgis.com/4.10/"></script>
</head>
<body>
  <div id="viewDiv"></div>
</body>
<script>
  require([
    "esri/Map",
    "esri/views/MapView",
    "esri/symbols/SimpleMarkerSymbol",
    "esri/Graphic"
  ], function (
    Map,
    MapView,
    SimpleMarkerSymbol,
    Graphic
  ) {

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

    var view = new MapView({
      container: "viewDiv",
      map: map,
      zoom: 10,
      center: [-118, 34],
      rotation: 30
    });

    const markSymbol = new SimpleMarkerSymbol({
      size: 20,
      color: "white",
      style: "circle",
      outline: {
        color: [56, 158, 0, 1],
        width: 2,
        style: "short-dot"
      }
    });
    view.on("click", function (event) {
      console.log(event)
      var symbolGraphic = new Graphic({geometry: event.mapPoint, symbol: markSymbol});
      view.graphics.add(symbolGraphic);
    });
  });
</script>
</html>

Outcomes