I'm using a map service that has simple green and gold lines. I don't want to expose the map service to the world, but I can provide an example of what the map service looks like through the AGO map viewer:
But as soon as I put this in a "custom" javascript page using ArcGISDynamicMapServiceLayer, the colors on the layers become muted:
Attached below is my source code consuming the dynamic map service:
<!DOCTYPE html>
<html>
<head>
<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></title>
<link rel="stylesheet" href="https://js.arcgis.com/3.18/esri/css/esri.css">
<script src="https://js.arcgis.com/3.18/"></script>
<script>
var map;
require(["esri/map",
"esri/layers/ArcGISDynamicMapServiceLayer",
"dojo/domReady!"], function(Map, ArcGISDynamicMapServiceLayer) {
map = new Map("map", {
basemap: "topo",
center: [-122.3321, 47.606],
zoom: 13
});
var testLayer = new ArcGISDynamicMapServiceLayer("My Map Service Layer");
map.addLayer(testLayer);
});
</script>
<style>
html, body, #map {
height: 100%;
padding: 0;
margin: 0;
}
</style>
</head>
<body class="claro">
<div id="map"></div>
</body>
</html>
It's a basic setup but for some reason the layer is coming across with muted colors. Any help or suggestions would be appreciated!