Select to view content in your preferred language

Horizontal/vertical Lines appear while panning map

2133
3
03-01-2012 02:57 AM
Salomon_VágadalJoensen
Deactivated User
I have a 250px X 250px map which, when panning, there will appear horizontal and vertical lines intermittently. I'm at a loss what could be causing this.

The map code:
      dojo.require("esri.map");

      var map;
      var sms =  new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND, 10,
       new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
       new dojo.Color([255,0,0]), 2),
       new dojo.Color([0,255,0,0.25]));

      var mLoc = new esri.geometry.Point(615839.4083,6877702.1883, new esri.SpatialReference({ wkid: 32629 }));  

      function init() {
        var initExtent = new esri.geometry.Extent( {
          "xmax": 615930.5776797816,
          "xmin": 615754.1002434933,
          "ymax": 6877746.606664156,
          "ymin": 6877660.616908844,
            "spatialReference": {
              "wkid":32629
            }
          });
       map = new esri.Map("map",{
          extent: initExtent,
          logo: false
       });
        //Add the topographic layer to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service    
        var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://www.kort.fo:8089/ArcGIS/rest/services/munin/Muninkort-vegir2/MapServer");
        map.addLayer(basemap);


Might it have something to do with this in the HTML?

   <div style="position: relative;">
    <div id="map" style="position: absolute; bottom: 0; right: 0; width: 250px; height: 250px; background: #99B3CC;" >
    </div>
   </div>


Reason for that background is for displaying the ocean colour in the map div.
0 Kudos
3 Replies
MattMoyles
Occasional Contributor
I get this too. It's because the map is made of tiles and you are seeing a little space in-between while zooming or panning. Maybe you could try to use HTML5 Canvas and CSS3 transitions. I'm not sure if it will help though. It also depends on the browser you are using.

Be careful using the HTML5 features. Many features will only work on the newest browsers. I don't think HTML5 Canvas is supported in IE until version 9 or 10 for example.
0 Kudos
Salomon_VágadalJoensen
Deactivated User
Thanks, I'll look into it.

EDIT: I've tried it on other machines and browsers, it seems to be just on the developer machine using Chrome, that those lines between the tiles appear -.-
0 Kudos
SimonJackson
Frequent Contributor
I am also experiencing this issue, and only noticed it happening when I moved from 3.2 to 3.3 API.


To Replicate:
Just go a bit crazy zooming in and out with a clean browser cache.

Im particularly finding that IE9 is the biggest culprit, but can also replicate in Chrome and Firefox.
I cannot replicate in 3.2 but I can in 3.3
I also need to have a black background due to when the user makes the basemap transparent, the map becomes black so that another service stands out on top of the black.

Im also noticing that it is not as apparent in JFiddle, but is more so from my main application, not too sure on the reasons why, maybe because there are a few other GET requests going on, its taking a little longer to render the new tiles perhaps.

To me this is a potential bug. But I am sure you made the changes for a good reason.

I notice that apart from this post that I have hijacked, I have seen others reporting this over here and here.

Whats your thoughts?  Create a NIM at your end, or/and can you suggest a workaround in the interim?
0 Kudos