Select to view content in your preferred language

bing aerial - levels of detail

798
2
04-04-2012 11:37 AM
danbecker
Frequent Contributor
I set custom lods in my map, so the user cannot zoom in beyond the extent of the tiled map service. Basically, so they never see the 'imagery cannot be displayed at this scale' message.

I can get lods from the arcgisonline World_imagery service by visiting:
http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=pjson

However, upon changing to a bing maps aerial, the above lods no longer apply for oblivious reasons, and the map zoom slider only works on every few tics.

So, on basemap change, I'd like to re-apply the lods specific to the basemap the user selects, thus, changing the map zoom tics on the slider.

I can listen for a basemap change
dojo.connect(basemapGallery,"onSelectionChange",function(){
    var bm = basemapGallery.getSelected();
    if (bm.title == "bing"){
        //somehow re-apply lods specific to the user-selected basemap;
    }
}


My questions:

1. where do I get the lods info for the bing aerial? I cannot simply append f=pjson to the service like I can for the arcgis World_IMagery service.
2. how would I re-apply lods, changing the basemap tics after the user selects a different basemap?

thanks!
0 Kudos
2 Replies
StephenLead
Honored Contributor
I could be wrong, but I believe that the LODs cannot be changed once the map has been instantiated - they become an intrinsic part of the map object when you issue the new map command.

I can get lods from the arcgisonline World_imagery service... However, upon changing to a bing maps aerial, the above lods no longer apply


Are you sure about that? If both basemaps (ArcGIS Online world imagery and Bing Maps) are using the same coordinate system, then the LODs should apply in both cases.

As far as I know, both of these maps are using Web Mercator ("spatialReference" : {"wkid" : 102100}) so you should be able to change between them as in this example.


1. where do I get the lods info for the bing aerial?
2. how would I re-apply lods, changing the basemap tics after the user selects a different basemap?


1. I believe these LODs are the same as for the ArcGIS Online example
2. I don't believe this is possible without destroying the map object and creating a new one.

Cheers,
Steve
0 Kudos
derekswingley1
Deactivated User
Steve is right, once LODs are defined (either by explicitly specifying the lods constructor parameter or implicitly by the first layer added to the map) you cannot change them.
0 Kudos