How to zoom in beyond basemap's maximum zoom

8429
9
Jump to solution
03-04-2012 01:51 AM
PatrickTierney
New Contributor
Hi,
I'm trying to display a dataset with a higher resolution than the Bing Map basemap, my current basemap. When I try to zoom in to see more detail, the map zooming stops, presumable because the Bing map doesn't support zooming in that much. Is there a way around this to allow me to zoom in beyond the level Bing maps supports? I don't mind if image quality degrades.

Thanks,

Patrick
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
Here is how I would test this...

1. Create a tiled map service which supports LODs below Bing Map. Bing Map's lowest scale of 1128 so create a tiled cache with 1000,500 and 250 scales. Make sure that the this tiled layer is in Web Mercator spatial reference.
2. Add Bing Map to the map first.
3. Add AGSTiledMapServiceLayer (not custom tiled layer for testing purpose) created in step 1 on top of Bing Map.
4. Now on map keep zooming in and it should allow zooming beyond 1128 scale.

I tested this and it just works.

Regards,
Nimesh

View solution in original post

0 Kudos
9 Replies
NimeshJarecha
Esri Regular Contributor
The best option is to add one more tiled layer (make sure that it has same spatial reference as bing map) which supports the level you want to view (below bing map's last level).

Regards,
Nimesh
0 Kudos
PatrickTierney
New Contributor
Sorry for revisiting this old thread, though after several weeks of trying I still haven't figured out how to zoom in past a basemap's maximum LOD/zoom. I've tried implementing a custom AGSTiledLayer with a higher LOD than the BingMap, though I still can't zoom in enough. If you have any experience adding more detailed layers to a base may I would certainly appreciate any examples.

I've attached an example of my detailed layer.

Many thanks,

Patrick
0 Kudos
NimeshJarecha
Esri Regular Contributor
Here is how I would test this...

1. Create a tiled map service which supports LODs below Bing Map. Bing Map's lowest scale of 1128 so create a tiled cache with 1000,500 and 250 scales. Make sure that the this tiled layer is in Web Mercator spatial reference.
2. Add Bing Map to the map first.
3. Add AGSTiledMapServiceLayer (not custom tiled layer for testing purpose) created in step 1 on top of Bing Map.
4. Now on map keep zooming in and it should allow zooming beyond 1128 scale.

I tested this and it just works.

Regards,
Nimesh
0 Kudos
PatrickTierney
New Contributor
Hi Nimesh,

I finally got it working using a modified version of my previous code -- using a AGSTiledLayer and a dummy tile retrieve operation. I didn't want to spend time making another map on the server, I simply wanted the bing map to zoom in slightly more. It's probably a hack but it works...

Thanks again for the help,

Patrick
0 Kudos
NimeshJarecha
Esri Regular Contributor
Great! Finally you got it working! 🙂

Regards,
Nimesh
0 Kudos
SimonJackson
Occasional Contributor III

Is this the best way to achieve this? From a Flex and Javascript API perspective, adding LODs was part of the API.

Specify LODs (levels of detail) | ArcGIS API for JavaScript

Was hoping for a similar method on the AGSMapView.

0 Kudos
by Anonymous User
Not applicable

Nimesh solution is probably the best, here is another idea :

You can change the maxScale of the map itself and the layer to zoom beyond the tile and stretch it.

Listen for the basemap did load and do it inside the delegate

AGSTiledMapServiceLayer *basemap = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:url]; // or bing, whatever you like

    basemap.delegate = self;

    [self.mapView addMapLayer:basemap withName:@"basemap"];

- (void)layerDidLoad:(AGSLayer *)layer

{

    layer.maxScale = 0;

    self.mapView.maxScale = 10;

 

}

Hope this helps

Cheers

Al

JoeWong1
New Contributor

Al,

I used the following code:

self.mapView.maxScale = 10 and was able to zoom in beyond the ArcGIS Imagery Basemap.  However, the issue that I am having is that when I zoom in beyond the imagery basemap, the basemap disappears.  Is there a way to keep the basemap within the mapView even if it is distorted?

A co-worker of mine said that that was possible but I haven't been able to get it to work.

thanks,

Joe

0 Kudos
DiveshGoyal
Esri Regular Contributor

You will need override the max scale property of the imagery basemap layer. Otherwise it will turn off if you zoom in beyond the max scale.

0 Kudos