Use TPK to spin up a local service in Runtime Local Server?

157
3
08-18-2020 06:32 PM
VishApte
Esri Contributor

Hi,

I have a requirement to create local server services for a map package and a tile package. I can instantiate a LocalMapService using a MPK. But I cannot find a way to instantiate LocalMapService (or any other service type) for a TPK. Only way seem to be to create a ArcGISTiledLayer using TileCache which can only work in Runtime MapView.

The requirement is to spin up a local server and services for a consumption in offline Javascript/HTML application (beyond my control). The JavaScript application will need to show basemap using TPK and business layers using MPK. 

Is it possible?

Thanks,

Vish

Tags (3)
0 Kudos
3 Replies
dotMorten_esri
Esri Frequent Contributor

Local Server is there to fill a gap of features that might not be available out-of-the-box in Runtime. Runtime has native TPK support without local server, so AFAIK this isn't a feature that local server provides.

VishApte
Esri Contributor

Thanks for a prompt reply Morten Nielsen

I guess I have to find another way to show TPK as basemap in JavaScript app. May be a custom Tile Layer. 

Another issue I found with Runtime Local Server is, it doesn't support CORS and doesn't support Referer in request header. Tried to play with crossdomain.xml and clientaccesspolicy.xml files in C:\Program Files (x86)\ArcGIS SDKs\LocalServer100.8\64\web\crossdomain folder. But it didn't make any difference.

MichaelBranscomb
Esri Frequent Contributor

Hi,

It sounds like you might be trying to cross two separate products. ArcGIS Runtime Local Server is only supported for use with client applications built with ArcGIS Runtime SDK for .NET, ArcGIS Runtime SDK for Java, and ArcGIS Runtime SDK for Qt. It is not supported for use with ArcGIS API for JavaScript.

I recommend posting your JavaScript question in ArcGIS API for JavaScript 

Thanks

Mike

0 Kudos