Select to view content in your preferred language

Map not zooming to extent specified when using World street map version 10.1

3349
7
05-16-2014 10:26 AM
by Anonymous User
Not applicable
Original User: helengeb

I am trying to zoom my map to chicago are.
When using arcgis 10.2 base layer for world street(Using REST URL http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer) my map zooms to the expected layer.

BUT when I use arcgis 10.1 world street map base layer(Which I deployed my self using ARCGIS for server 10.1 from the 10.1 sd file) my map does not zoom to the place. It just shows me areas outiside of the extent plus my slider is on the top which makes it impossible to zoom even using the slider.

Here is my code
 
var chicagoMetroAreaExtent = new esri.geometry.Extent(-87.9468, 41.6006, -87.5248, 42.0416, new esri.SpatialReference({wkid:3857}) );
  myMap = new esri.Map("mapDiv", { extent: startExtent });
  var mapServiceURL10_2 = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer";
   var mapServiceURL10_1 = "my 10.1 world street map";
   

myMap.setExtent(chicagoMetroAreaExtent);  
  //This zooms correctly to chicagoMetroAreaExtent
  myMap.addLayer(new esri.layers.ArcGISTiledMapServiceLayer(mapServiceURL10_2));
 
  //This base layer does not zoom correctly to chicagoMetroAreaExtent
// myMap.addLayer(new esri.layers.ArcGISTiledMapServiceLayer(mapServiceURL10_1));


Please see the attached images for me details.

I even tried to specify the lods for the map when using the 10.1 base layer for world street map but it gives me white background as shown in picture.
0 Kudos
7 Replies
ScottGunn
Regular Contributor
Just a couple of thoughts...

1) Make sure the projection of your 10.1 basemap is the same as the rest of the map service (wkid 3857)
2) For the white tile issue, make sure you've specified the correct level of tile caching (at all zoom levels, for example) in the service definition.  I believe you can go back and change this in the ArcGIS Server manager web interface, but you might have to republish the service through ArcMap.
edit: just realized you said you set the Level of Detail already...my apologies.
0 Kudos
by Anonymous User
Not applicable
Original User: helengeb

Is there a way to change my map to have more zoom levels using ARCGIS Server Manager?

Here is what I see when I have the tile info when I got to my rest service(Whish seems to have less zoom levels)
http://myserver:6080/arcgis/rest/services/World_Street_Map/MapServer


Tile Info:
Height: 256
Width: 256
DPI: 96
Levels of Detail: 10
Level ID: 0 [ Start Tile, End Tile ]
Resolution: 156543.03392800014
Scale: 5.91657527591555E8
Level ID: 1 [ Start Tile, End Tile ]
Resolution: 78271.51696399994
Scale: 2.95828763795777E8
Level ID: 2 [ Start Tile, End Tile ]
Resolution: 39135.75848200009
Scale: 1.47914381897889E8
Level ID: 3 [ Start Tile, End Tile ]
Resolution: 19567.87924099992
Scale: 7.3957190948944E7
Level ID: 4 [ Start Tile, End Tile ]
Resolution: 9783.93962049996
Scale: 3.6978595474472E7
Level ID: 5 [ Start Tile, End Tile ]
Resolution: 4891.96981024998
Scale: 1.8489297737236E7
Level ID: 6 [ Start Tile, End Tile ]
Resolution: 2445.98490512499
Scale: 9244648.868618
Level ID: 7 [ Start Tile, End Tile ]
Resolution: 1222.992452562495
Scale: 4622324.434309
Level ID: 8 [ Start Tile, End Tile ]
Resolution: 611.4962262813797
Scale: 2311162.217155
Level ID: 9 [ Start Tile, End Tile ]
Resolution: 305.74811314055756
Scale: 1155581.108577
0 Kudos
KenBuja
MVP Esteemed Contributor
You can specify the number of LODs that your map has. Take a look at this sample.
0 Kudos
by Anonymous User
Not applicable
Original User: Rahul_M

Hi Helengeb,

I think the issue that you are facing is because of following line:
var chicagoMetroAreaExtent = new esri.geometry.Extent(-87.9468, 41.6006, -87.5248, 42.0416, new esri.SpatialReference({wkid:3857}) );


the values -87.9468, 41.6006, -87.5248, 42.0416 are within range of -180 to +180 so it is geographical coordinate system. Hence spatial reference should be 4326.

If you are sure if have publish base map in 102100 spatial reference. try using extent value in same spatial reference.

I hope this helps.

Regards,
Rahul
0 Kudos
HelenAraya1
Deactivated User
Hi Helengeb,

I think the issue that you are facing is because of following line:
var chicagoMetroAreaExtent = new esri.geometry.Extent(-87.9468, 41.6006, -87.5248, 42.0416, new esri.SpatialReference({wkid:3857}) );


the values -87.9468, 41.6006, -87.5248, 42.0416 are within range of -180 to +180 so it is geographical coordinate system. Hence spatial reference should be 4326.

If you are sure if have publish base map in 102100 spatial reference. try using extent value in same spatial reference.

I hope this helps.

Regards,
Rahul


Hi Rahul,
I actually do convert the numbers to 102100(Web mercator)( I have a method for doing that) before I pass them to the map that is what I am doing
var chicagoMetroAreaExtent = new esri.geometry.Extent(ToWebMercator(-87.9468),ToWebMercator( 41.6006), ToWebMercator(-87.5248), ToWebMercator(42.0416), new esri.SpatialReference({wkid:3857}) );

My issue is with my local deployed REST service not supporting the zooming. my map works fine when I use the ESRI REST service for world street map but it does not work with my local world street map.
0 Kudos
by Anonymous User
Not applicable
Original User: helengeb

You can specify the number of LODs that your map has. Take a look at this sample.


I did specify the lods in code but I get a white background map. I think the tiles are missing at that zoom level.
0 Kudos
by Anonymous User
Not applicable
Original User: jeff.pace

Hi Rahul,
I actually do convert the numbers to 102100(Web mercator)( I have a method for doing that) before I pass them to the map that is what I am doing
var chicagoMetroAreaExtent = new esri.geometry.Extent(ToWebMercator(-87.9468),ToWebMercator( 41.6006), ToWebMercator(-87.5248), ToWebMercator(42.0416), new esri.SpatialReference({wkid:3857}) );

My issue is with my local deployed REST service not supporting the zooming. my map works fine when I use the ESRI REST service for world street map but it does not work with my local world street map.


you shouldnt be sending the individual values to webmercator.  You can to send the pair.
0 Kudos