Select to view content in your preferred language

Mobile Flex Zoom into Tile Package

3498
10
01-29-2013 04:12 AM
MattSheehan
Deactivated User
We are using tile packages generated in ArcMap 10.1. Zooming to building level is failing on the mobile. The steps are as follows:

1) Open TIF in ArcMap 10.1. Zoom to buildings/bushes looks good:

http://webmapsolutions.com/assets/blog/tpk/tpk1.jpg

2) Generate TPK in ArcMap 10.1 and set highest level of detail of 20:

http://webmapsolutions.com/assets/blog/tpk/tpk2.jpg

3) Copy TPK to mobile device and write simple Flex Mobile app to display tpk:

http://webmapsolutions.com/assets/blog/tpk/tpk3.jpg

4) The above is the farthest the app will zoom before we lose the imagery:

http://webmapsolutions.com/assets/blog/tpk/tpk4.jpg

The simple Flex mobile code is included below. We added LODs without success:

<fx:Script>
  <![CDATA[
   import com.esri.ags.layers.ArcGISLocalTiledLayer;
   import com.esri.ags.layers.supportClasses.LOD;
   import com.esri.ags.events.MapEvent;
  
   private function init():void
   {
   
    map.addEventListener(MapEvent.LOAD, addLODs);
   
    const filetpk:File = File.documentsDirectory.resolvePath("Download/Untitled.tpk");
    if(filetpk.exists)
    {
     var localTPK:ArcGISLocalTiledLayer = new ArcGISLocalTiledLayer();
     localTPK.name = "offlinelayer";
     localTPK.file = filetpk;
     localTPK.visible = true;
    
     map.addLayer(localTPK);
    
    }
   }
  
   private function addLODs(e:Event):void
   {
    var lods:Array = map.lods;
    lods.push(new LOD(NaN, 0.6, 3000));
    lods.push(new LOD(NaN, 0.3, 1500));
    lods.push(new LOD(NaN, 0.1, 500));
    map.lods = lods;
   }

  ]]>
</fx:Script>

<esri:Map id="map"/>

We wondered if anybody had thoughts on getting past this zoom limit?

Thanks

--Rory
Tags (2)
0 Kudos
10 Replies
raffia
by
Deactivated User
Hello all;

I am having a similar issue where the app wont show the local tiles, driving me nuts, here is the code. I left some of what seems to be irrelevant, just in case it is causing something. Thanks.


   <esri:Map id="myMap">   


    <esri:ArcGISLocalTiledLayer visible="true" file="{File.documentsDirectory.resolvePath('CFC5.tpk')}"/>
    <esri:ArcGISTiledMapServiceLayer id="falseVectorMap" visible="false"
             url="http://arcgis4.roktech.net/arcgis/rest/services/DigitalEgypt/CFC_Hybrid_A/MapServer"/>    
    <esri:ArcGISTiledMapServiceLayer id="ImageryMap" visible="false"
             url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer"/>            
    <s3:S3ArcGISTiledMapServiceLayerPNG id="orthos" visible="false"
             url="http://mapcache.roktech.net.s3.amazonaws.com/DigitalEg_orthos_esri_update/MapServer"/> 
    <esri:ArcGISTiledMapServiceLayer visible="false" id="VectorMap"
           url="http://arcgis4.roktech.net/arcgis/rest/services/DigitalEgypt/CFC_Hybrid_A/MapServer"/> 
    <esri:ArcGISLocalTiledLayer visible="true" file="{File.documentsDirectory.resolvePath('CFC5.tpk')}"/>


   </esri:Map>
0 Kudos