Getting tile images from tile package (.tpk)

1032
5
09-04-2017 08:39 PM
STTan
by
New Contributor

Hi, we have implemented a .NET web application for our customer. The web application is using javascript SDK to load basemap from ArcGIS Server. 

Recently there is a requirement from client to load basemap from tile package, instead of connecting to ArcGIS Server. 

To minimise the change, I would like to find out whether it is possible to load .tpk using .NET SDK, then get the tile image by passing in level, row, and column or not. 

If that's possible, in our javascript code, we will extend esri.layers.ArcGISTiledMapServiceLayer to load tile image from same Server. 

0 Kudos
5 Replies
NagmaYasmin
Occasional Contributor III

Hello,

It is possible. Please look at this thread that has the code snippet to display tpk file.

https://community.esri.com/message/697849-how-can-i-get-the-minscale-and-maxscale-from-a-tile-packag... 

TileCache Class 

Hope that helps.

STTan
by
New Contributor

Thanks, we will explore that. 

0 Kudos
dotMorten_esri
Esri Notable Contributor

You can't call the .NET Runtime from JavaScript, and the license prevents you from using it in a server environment.

0 Kudos
STTan
by
New Contributor

No, not directly. 

In JavaScript, we will initiate a HTTP request to web server to get tile image. At the Server side, the API will use .NET Runtime SDK to load .tpk file, get the tile images once it's loaded, then respond it to the caller. 

Of course, that's provided we are able to get specific tile images after .tpk file is loaded. 

Would the license prevent me from using it in Server environment? According to the following link, I can use Native Client SDKs with just "Essentials": 

Pricing | ArcGIS for Developers 

0 Kudos
dotMorten_esri
Esri Notable Contributor

> Would the license prevent me from using it in Server environment

Yes. You cannot use the runtime in a server environment. You will need a Server Deployment license to deploy ArcGIS Software on the server, and such a license does not exist for the runtimes.

Also the component has never been developed for running in a multi-client environment that a webserver is, and you could exhaust the system's handles and bring down the entire server.

0 Kudos