Select to view content in your preferred language

Tile Package weirdness: Flex CAN NOT consume some TPKs as an ArcGISLocalTiledLayer

2419
11
05-15-2013 02:32 PM
DirkVandervoort
Frequent Contributor
ArcGIS Desktop 10.1 SP used to create two TPKs

  • Using an mxd with vector data (Some points, lines and polygons with simple symbology using pure red, green and blue colors)

  • Using an AGS map service that serve the same content as the mxd (above)

20 LODs (required) and PNG output. Both the map service and the mxd use a state plane SRS.

The results:

  • The vector-generated TPK can be drag-n-dropped into ArcMap and display just fine.

  • A Flex API mobile map using the TPK as a ArcGISLocalTiledLayer does not display the TPK

  • The TPK generated from the AGS Map service can be drag-n-dropped into ArcMap and display just fine - albeit grainy (expected)

  • The Flex API mobile map using the TPK as a ArcGISLocalTiledLayer does displays the TPK just fine

So what's up? Am I missing some special magic to create the TPK?

The geoprocess:
CreateMapTilePackage D:\documents\Project\Maps\Some.mxd ONLINE D:\documents\Tiles/Tiles.tpk PNG 20 # # #


The Flex code:
<esri:Map width="100%" height="100%">        
     <esri:ArcGISLocalTiledLayer file="{File.documentsDirectory.resolvePath('Tiles/Tiles.tpk')}"/>
</esri:Map>
Tags (2)
0 Kudos
11 Replies
DasaPaddock
Esri Regular Contributor
Can you check if you're getting a loadError event and then see what the fault is?

Reference:
http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/layers/Layer.html#event:loadError

Also, what version of the API are you using?
0 Kudos
DirkVandervoort
Frequent Contributor
Hi Dasa!

Yes, it does throw a LayerEvent.LOAD_ERROR.

The fault is an mx.rpc.Fault. And more telling, the faultString is:

kpLayerMissingConfXML: Cannot locate conf.xml in tpk file.


It's the 3.3 API BTW.

I carved into the TPKs with WinZip and the conf.xml is in both and the contents are identical.

For some reason the vector-generated tpk is not allowing the Flex API to see the conf.xml

What next can I do? TIA

--Dirk
0 Kudos
DasaPaddock
Esri Regular Contributor
I'd double-check that the tpk has 0 compression. You may need to contact Esri Support.
0 Kudos
DirkVandervoort
Frequent Contributor
Yep. 0% compression. I'll put in a help ticket. Thanks Dasa.
0 Kudos
BjornSvensson
Esri Regular Contributor
I'm not 100% sure it's the same issue, but we had a dependency on the name of the data frame in ArcMap (which ends up within the TPK file).  It only worked if the data frame is named "Layers".

This will be fixed for the next release (3.4).

NIM092226: .tpk files are not working in Flex AIR application using ArcGISLocalTiledLayer if the dataframe name in the original .mxd file is other than "Layers".
0 Kudos
raffia
by
Deactivated User
Hello all;

I thought this would be a good place to ask this question. I see that the ArcGIS sdk for iOS has great offline features such as maps, geocoding and routing. Are these also available with the ArcGIS API for Flex running on Air. Either a desktop app or a mobile one?

Thanks;
Raffi
0 Kudos
LloydHeberlie
Regular Contributor
Hello all;

I thought this would be a good place to ask this question. I see that the ArcGIS sdk for iOS has great offline features such as maps, geocoding and routing. Are these also available with the ArcGIS API for Flex running on Air. Either a desktop app or a mobile one?

Thanks;
Raffi


Hi Raffi,

These features (offline features such as maps, geocoding and routing) are not part of the ArcGIS API for Flex.
0 Kudos
raffia
by
Deactivated User
Hi Raffi,

These features (offline features such as maps, geocoding and routing) are not part of the ArcGIS API for Flex.


Hello Lloyd;

Many thanks for the reply.

Just to be sure, this also applies even if we are using Flex and with Adobe Air and are packaging for iOS. This gives us access to plist and some other tricks...maybe there is a work around? But I assume the offline maps work fine with that setup on iOS and Android?

As we are a start up, this project can make or break us. Our potential client will install these large touch screens in various parts of his residential project. This device is going to be tough to connect to the internet, but we can request a specific device type to be installed. Users are supposed to be able to generate driving directions, and search functionality backed by a geocoding layer. This is in addition to offline maps ofcourse. So the question is...is there a specific device type (It cant be a tablet, something bigger and more awkward) and an operating system that the client can install. And on top of that we can build an app using a specific API that can provide offline maps, routing and geocoding? Maybe the windows 8 API?

Thanks again;
Raffi
0 Kudos
raffia
by
Deactivated User
And finally, can the ArcGIS API for flex query offline layers from the tiles or something else that will make it read data from table and feature classes?
0 Kudos