You are here: > ESRI Forums > arcgis server forums > Thread Replies

ArcGIS Server Forums

ArcGIS Server: Caching forum

Cache quality is low   mark rankin Mar 09, 2010
Re: Cache quality is low   Randall W Mar 09, 2010
Re: Cache quality is low   mark rankin Mar 09, 2010
Re: Cache quality is low   Randall W Mar 10, 2010
Re: Cache quality is low   mark rankin Mar 10, 2010
Re: Cache quality is low   Randall W Mar 12, 2010
Re: Cache quality is low   mark rankin Mar 15, 2010
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Cache quality is low 
Author mark rankin 
Date Mar 09, 2010 
Message Hi All,

I'm new to caching and I really like the performance enhancement it has given me. My problem is that when the map is in an .mxd I have very uniform colors, but when I cache the map there is a subtle stipple that appears and clouds the map. Does anyone have any ideas of how to get rid of the unwanted 'stipple'? I've included an attachment showing an example of the cache.

Thanks for any help on this matter. 
  StipplePrintScreen.doc (opens in new window)
 
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Cache quality is low 
Author Randall W 
Date Mar 09, 2010 
Message Hmmm....that kind of looks like the map image is being resampled somehow instead of using the map cache. I'd recommend verifying by downloading and installing the fiddler tool (fiddler2.com) then running it while your client (web mapping application or ArcGIS Desktop) is running. Pan and zoom around and examine the requests gathered by fiddler. Do you see if the ArcGISCache virtual directory is being accessed to pull out the .png files, or are the tiles being served through the map resource manager? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Cache quality is low 
Author mark rankin 
Date Mar 09, 2010 
Message Hi Randall,
That fiddler2 is cool. It gave me an idea of what is going on, the only problem is I don't know how to fix it. When I use the ArcGISTiledMapServiceLayer command the site tries to hit the png files directly but can't (the log in fiddler2 says autoproxy detection failed). When I use the ArcGISDynamicMapServiceLayer command I get the cached tiles and the performance of the cached tiles, but with the ghost stipple (at least it seems like it's cached because the labels don't move dynamically and the performance is very good). Also when I go into C:\arcgisserver\proxycache I can see the png files and they don't have the ghost stipple. So I think my real problem is figureing out why the ArcGISTiledMapServiceLayer isn't pointing directly to the cached png files. Hmmmm? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Cache quality is low 
Author Randall W 
Date Mar 10, 2010 
Message Interesting. Just so I know, what platform are you using for your reverse proxy? Also, do you see the same issues if you create an out-of-the-box web mapping application using ArcGIS Server Manager? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Cache quality is low 
Author mark rankin 
Date Mar 10, 2010 
Message I hope I answer your questions correctly. We are using IIS 6 and ArcGIS Server Manager 9.3. I'm a bit confused because I just went in and looked at the ESRI help page and they set the image to jpeg (even though the cache is PNG8). When I do that the stipple goes away. Maybe I'm not hitting the cache, but the service seems to run fast and the fact that the labels don't move when I pan makes me think that somehow it is hitting the cache. I included the code I'm using. Most of it is stolen directly from ESRI's sample site. 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>Douglas County Snow Removal</title>
    <style type="text/css">
      @import "http://serverapi.arcgisonline.com/jsapi/arcgis/1.6/js/dojo/dijit/themes/tundra/tundra.css";
      .zoominIcon { width:16px; height:16px; }
      .zoomoutIcon { width:16px; height:16px; }
      .zoomfullextIcon { width:16px; height:16px; }
      .zoomprevIcon { width:16px; height:16px; }
      .zoomnextIcon { width:16px; height:16px; }
      .panIcon { width:16px; height:16px; }
      .deactivateIcon { width:16px; height:16px; }
    </style>
    <script type="text/javascript">djConfig = { parseOnLoad:true }</script>
    <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.6"></script>

    <script type="text/javascript">
      dojo.require("esri.map");
      dojo.require("esri.toolbars.navigation");

      dojo.require("dijit.form.Button");
      dojo.require("dijit.Toolbar");

      var map, navToolbar;
      function init() {
        esriConfig.defaults.map.sliderLabel = null;

        var customExtentAndSR = new esri.geometry.Extent(3044471.352,1463577.991,3244804.685,1637911.325,new esri.SpatialReference({"wkid":2232}));
        var map = new esri.Map("map", {extent:customExtentAndSR});

        var imageParameters = new esri.layers.ImageParameters();
        imageParameters.format = "JPEG";  //set the image type to JPEG, note default is PNG8.


        var mapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://apps.douglas.co.us/ArcGIS/rest/services/BaseMap/MapServer", {"opacity":0.85, "imageParameters":imageParameters});
        map.addLayer(mapServiceLayer);

        var mapServiceLayer1 = new esri.layers.ArcGISDynamicMapServiceLayer("http://apps.douglas.co.us/ArcGIS/rest/services/SnowRemoval/MapServer", {"opacity":0.6});
        map.addLayer(mapServiceLayer1);

        navToolbar = new esri.toolbars.Navigation(map);
        dojo.connect(navToolbar, "onExtentHistoryChange", extentHistoryChangeHandler);
      }

      function extentHistoryChangeHandler() {
        dijit.byId("zoomprev").disabled = navToolbar.isFirstExtent();
        dijit.byId("zoomnext").disabled = navToolbar.isLastExtent();
      }

      dojo.addOnLoad(init);
    </script>
  </head>
  <body class="tundra">
    <div id="navToolbar" dojoType="dijit.Toolbar">
      <div dojoType="dijit.form.Button" id="zoomin" iconClass="zoominIcon" onClick="navToolbar.activate(esri.toolbars.Navigation.ZOOM_IN);">Zoom In</div>
      <div dojoType="dijit.form.Button" id="zoomout" iconClass="zoomoutIcon" onClick="navToolbar.activate(esri.toolbars.Navigation.ZOOM_OUT);">Zoom Out</div>
      <div dojoType="dijit.form.Button" id="zoomfullext" iconClass="zoomfullextIcon" onClick="navToolbar.zoomToFullExtent();">Full Extent</div>
      <div dojoType="dijit.form.Button" id="zoomprev" iconClass="zoomprevIcon" onClick="navToolbar.zoomToPrevExtent();">Prev Extent</div>
      <div dojoType="dijit.form.Button" id="zoomnext" iconClass="zoomnextIcon" onClick="navToolbar.zoomToNextExtent();">Next Extent</div>
      <div dojoType="dijit.form.Button" id="pan" iconClass="panIcon" onClick="navToolbar.activate(esri.toolbars.Navigation.PAN);">Pan</div>
      <div dojoType="dijit.form.Button" id="deactivate" iconClass="deactivateIcon" onClick="navToolbar.deactivate()">Deactivate</div>
    </div>
    <div id="map" style="width:600px; height:600px; border:1px solid #000;"></div>
  </body>
</html>
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Cache quality is low 
Author Randall W 
Date Mar 12, 2010 
Message More questions:

1. What version IE are you using? IE6, maybe?
2. Are you using PNG8, PNG24, or PNG32?

Reason I ask is that IE6 has trouble rendering PNG24. Also, PNG8 can only display 256 colors - if you're using an unusual color, the PNG may be trying to color correct, thus producing the stippling effect you're using.
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Cache quality is low 
Author mark rankin 
Date Mar 15, 2010 
Message Hi Randall,
I bet it's the colors. The cache is a PNG8 and some of the colors have been customized to match our standard static map. That would make sense as to why it is resampling the colors to match what PNG8 has available. Thanks for all the help on this Randall.