AnsweredAssumed Answered

property color of SimpleFillSymbol does not work

Question asked by jose@apiAG on Jan 19, 2018
Latest reply on Jan 23, 2018 by jose@apiAG

Hi.

I have problem with the color property of SimpleFillSymbol in some polygons it works and in others not, what can you be? shipping part of the code.

 

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title></title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>

<link rel="stylesheet" href="https://js.arcgis.com/4.6/esri/css/main.css">
<script src="https://js.arcgis.com/4.6/"></script>
<script src="script/regiones.js"></script>
<script>
require([
"esri/Map",
"esri/views/SceneView",
"esri/geometry/Polygon",
"esri/symbols/SimpleFillSymbol",
"dojo/dom",
"dojo/domReady!"
], function(Map, SceneView, Polygon, SimpleFillSymbol) {

var map = new Map({
basemap: "osm",
ground: "world-elevation"
});

var view = new SceneView({
container: "viewDiv",
map: map
center: [-71.650,-35.400]
});

var ringsRegiones = [
coordReg["arica"]
];
var polygonRegiones = new Polygon({
rings: ringsRegiones
});

var fillSymbolRegiones = new SimpleFillSymbol({
color: [227, 139, 79, 0.5],
outline: {
color: [0, 255, 197],
width: 2
}
});

var polygonGraphicRegiones = new Graphic({
geometry: polygonRegiones,
symbol: fillSymbolRegiones
});

view.graphics.add(polygonGraphicRegiones);

});
</script>
</head>

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

Outcomes