Upgrading from 3.0 to 3.2 - Map's gone off

882
5
Jump to solution
10-03-2012 10:24 AM
by Anonymous User
Not applicable
Original User: myESRIUName

Hello all,

I have an application that is essentially set up as follows, but has all kinds of other things going on as well:

            this.initExtent = new esri.geometry.Extent({"xmin":-14734647,"ymin":5119940,"xmax":-5862275,"ymax":8219011,"spatialReference":{"wkid":102100}});              this.map = new esri.Map(                 "Core_Map"                 ,{                     "wrapAround180": true                     ,"extent": this.initExtent                 }             );              var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");             this.map.addLayers([basemap]);


When I use http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.0, my application appears like this:
[ATTACH=CONFIG]18175[/ATTACH]

But, when I change it to http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2, my application appears like this:
[ATTACH=CONFIG]18176[/ATTACH]

It seems that the tiling gets offset somehow. The three tiles you are seeing in the 3.2 display should be the top 3 tiles in the map, but it's offsetting them. Further, the requests to the service are different between the 3.0 and 3.2 versions of my app. Different tiles are being asked for...all off by 1 in the 3.2 app. So, something about the map is getting whacky somewhere along the line. Here are the requests from each (there are fewer requests made with the unsuccessful 3.2 map):
From the 3.0 successful map:  http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/4/1 http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/5/1 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/6/1 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/4/2 http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/5/2 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/6/2 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/4/3 http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/5/3 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/6/3 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/4/4 http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/5/4 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/6/4 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/4/5 http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/5/5 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/6/5   From unsuccessful 3.2 map:  http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/4/2 http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/5/2 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/6/2 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/4/3 http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/5/3 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/6/3 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/4/4 http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/5/4 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/6/4 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/4/5 http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/5/5 http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/6/5


Now, I assume that something has changed in the JSAPI somewhere along the way and it's therefore likely that something else I am doing in my application is throwing this off. However, at the moment, I believe I have commented out everything relevant and I am just doing the basics noted above and it is still not appearing properly.

Can anyone suggest what might be throwing the map off like this, so I can review my app to see if I'm doing something related and harmful? At the moment I'm unable to figure out what might be affecting it this way and am effectively stuck.

Cheers,
jtm
0 Kudos
1 Solution

Accepted Solutions
CraigMcDade
Occasional Contributor III
did you add the required CSS tag new in 3.2?

<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" />

View solution in original post

0 Kudos
5 Replies
CraigMcDade
Occasional Contributor III
did you add the required CSS tag new in 3.2?

<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" />
0 Kudos
by Anonymous User
Not applicable
Original User: myESRIUName

Thank you, mcdade31!!

That was exactly my problem. I was unaware of the new CSS. Adding the line you suggested displays the map properly again.

Cheers,
jtm
0 Kudos
derekswingley1
Frequent Contributor
Glad you got this sorted out.

We talk about this change in the What's New in 3.2 and go into more detail in the Required CSS topic.
0 Kudos
by Anonymous User
Not applicable
Original User: morosanuae

You should also add this new CSS reference to the "Build your first application" concept page as fast as possible, because I think that this is the place most of us start with JavaScript API - including me-, and this is now a vital requirement for a functional application, no matter how simple it is.

Thanks.
Adrian.
0 Kudos
derekswingley1
Frequent Contributor
You should also add this new CSS reference to the "Build your first application" concept ... <snip>


Thanks, we'll get that updated ASAP.
0 Kudos