arcgis online basemap as dynamic service in flex viewer

2502
3
10-02-2014 04:04 AM
LeeCollier2
New Contributor


Looking to consume an arcgis online basemap in flex viewer, as the scales of the tiled service do not match the application scales was going to consume the arcgis online basemap as a dynamic service. Has anyone done this? Any ESRI staff like to comment on wether this is permissable?

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Lee,

   Sure you are allowed to do this here is the configuration:

<layer label="Streets" type="dynamic" visible="false" url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" icon="https://www.arcgis.com/sharing/rest/content/items/d8855ee4d3d74413babfb0f41203b168/info/thumbnail/wo..."/>

0 Kudos
EricGardecki
Occasional Contributor

I've been trying to do just this for awhile now and can't seem to get it to work.  In this case I'm using the World_Topo_Map basemap ( <layer label="Streets" type="dynamic" visible="false" alpha="1" url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/> ).  If I set it to dynamic it flat out just doesn't display whatsoever.  No errors and everything else displays but not that basemap.  If I set it to tiled, and it's the first basemap to load, it works but I get the undesired results of having LODs (i want freedom to zoom to whatever I want, including in farther than the basemap allows).  If I load a different, dynamic, basemap first and have the topo as tiled as another basemap option, it won't display at all when switching to it....no errors just nothing there.

I've been using my own basemap for awhile now due to this issue but I'm trying to fix it once again.  I do not have this problem with some of the other basemaps such as aerials or "USA_Topo_Maps" but wanted one of the ones with the streets and such as my first loaded, or at least an option!  Any suggestions?

0 Kudos
deleted-user-zGZcJ5TpRUeA
New Contributor III

Hi Lee,

   I have done exactly what you want to do. Basically you want the basemap to be tiled up until a certain point and then you want it to be dynamic so you can zoom in further. So first of all, you need to set the LOD's (Levels od Detail) and then you set the basemaps to turn on/off at certain scales. See the code below...

    <map attributionvisible="true" esrilogovisible="true" openhandcursorvisible="false" scalebarvisible="true" scalebar="default" zoomslidervisible="false" wraparound180="true" addarcgisbasemaps="false" top="40" portalurl="https://www.arcgis.com/">

        <lods>

<!-- map service LODs from

http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer -->

<lod resolution="156543.033928"  scale="591657527.591555 "/>

<lod resolution="78271.5169639999"  scale="295828763.795777 "/>

<lod resolution="39135.7584820001"  scale="147914381.897889 "/>

<lod resolution="19567.8792409999"  scale="73957190.948944 "/>

<lod resolution="9783.93962049996"  scale="36978595.474472 "/>

<lod resolution="4891.96981024998"  scale="18489297.737236 "/>

<lod resolution="2445.98490512499"  scale="9244648.868618 "/>

<lod resolution="1222.99245256249"  scale="4622324.434309 "/>

<lod resolution="611.49622628138"  scale="2311162.217155"/>

<lod resolution="305.748113140558"  scale="1155581.108577 "/>

<lod resolution="152.874056570411"  scale="577790.554289 "/>

<lod resolution="76.4370282850732"  scale="288895.277144 "/>

<lod resolution="38.2185141425366"  scale="144447.638572 "/>

<lod resolution="19.1092570712683"  scale="72223.819286 "/>

<lod resolution="9.55462853563415"  scale="36111.909643 "/>

<lod resolution="4.77731426794937"  scale="18055.954822 "/>

<lod resolution="2.38865713397468"  scale="9027.977411 "/>

<!--additional LODs not supported by the tiled map service,

so it will no longer show up and the dynamic service will take over-->

<lod resolution="0.6" scale="3000"/>

<lod resolution="0.3"  scale="1500"/>

<lod resolution="0.1" scale="500"/>

</lods>

<basemaps>

            <layer type="tiled" maxscale="4500" label="Light Gray Canvas" icon="https://www.arcgis.com/sharing/rest/content/items/8b3b470883a744aeb60e5fff0a319ce7/info/thumbnail/te..." url="http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer" visible="true"/>

            <layer type="dynamic" minscale="4500" label="Light Gray Canvas" icon="https://www.arcgis.com/sharing/rest/content/items/8b3b470883a744aeb60e5fff0a319ce7/info/thumbnail/te..." url="http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer" visible="true"/>

        </basemaps>

    </map>

0 Kudos