daconrad

map.centerAt  causes Tiled service to disappear in IE.

Discussion created by daconrad on Jul 27, 2012
Latest reply on Jun 23, 2014 by klapine
Hi,

I am developing a web application that uses map.centerAt() to pan the user to different search results.  While debugging my application, I noticed that from time to time my base map would disappear.  I created a sample app that uses map.centerAt() to pan the map between LA and New York when the map is clicked.  I inserted the html below and also attached it as a txt file.  What I am seeing is that map.centerAt() works well when the user is zoomed out, but if they are zoomed in past level 17 the map goes white and the tiled service flickers when I pan with the mouse. 

I was wondering if anyone else has experienced this behavior.  I am only seeing this in IE9.

Thanks!

[HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
    <!--The viewport meta tag is used to improve the presentation and behavior of the samples
      on iOS devices-->
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
    <title>Test Center At</title>
      <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.0/js/dojo/dijit/themes/claro/claro.css">
    <script type="text/javascript">djConfig = { parseOnLoad:true }</script>
    <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.0"></script>

    <script type="text/javascript" charset="utf-8">
      dojo.require("esri.map");
  
   var map;
   var lastPoint;
      function init() {
        map = new esri.Map("map");
 
  dojo.connect(map,"onLoad",mapLoaded);
        var tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer");
  map.addLayer(tiledMapServiceLayer);            
      }
  
   function mapLoaded() {
  
     <!-- Create the two points to pan between -->
  var laPoint = new esri.geometry.Point(-13163009.16521190,4035986.6473330655, map.spatialReference);    
        var nyPoint = new esri.geometry.Point(-8238434.715895471,4970328.593163353, map.spatialReference);
        lastPoint = laPoint;
 
  dojo.connect(map, "onClick", function(evt) {
           if(lastPoint == laPoint) {
    lastPoint = nyPoint;
    map.centerAt(nyPoint);
     } else {
    lastPoint = laPoint;
    map.centerAt(laPoint);
     }
  });
             
   }

      dojo.addOnLoad(init);
    </script>

  </head>
  <body class="claro">
    <div style="position:relative;">
      <div id="map" style="width:1024px; height:512px; border:1px solid #000;">
      </div>
    </div>
  </body>
</html>[/HTML]

Attachments

Outcomes