How to reference to Offline map & tiles from ArcGIS SDK in Java

3125
6
Jump to solution
10-14-2015 05:40 AM
ErayHANGUL
New Contributor II

Hi all,

I developed a simple GIS module through using the ArcGIS SDK on Java with these features :

- Map : Map options, Map coordinates

- Toolkit : Navigator, Overviewmap, Drawing overlay

- Graphics layers : Select graphics, Draw graphics

- Geometry : Line length

- Routing and navigation : GPS layer, Advanced GPS info

Hezarfen_Initial_View-Snapshot.PNG

Everything is working well in online mode. But at production stage there will be no internet connection at client side.

So, how can i refer to a SATELLITE or NATIONAL_GEOGRAPHIC or STREETS etc. version of a map on local machine while serving the features listed above also?

For example this code zoom to Turkey at Level-6 through online server's of Esri. 

MapOptions mapOptions = new MapOptions(MapType.STREETS, 39.0000, 32.0000, 5); // Turkey wt. zoom level 6

I guess two solutions but i couldn't find the reference mechanism on Java side.

Option-1 : Prepare a custom map on ArcGIS Desktop software and export the map and tiles info to a folder. Then refer to this folder.

Option-2 : Download a pre-built map from ArcGIS web site (For example Turkey NATIONAL_GEOGRAPHIC map) with its tiles. Then install a ArcGIS server on client side and load the map & tiles to map server. At last give reference to 127.0.0.1/localhost to access it.

Does anybody have opinion about this?

Best regards,

Eray

0 Kudos
1 Solution

Accepted Solutions
nita14
by
Regular Contributor

Hi Eray,

There are two options:

1) If you want to use small area and create tpk from Esri Basemap on - demand. Check hehe: Creating tpk file

2) If you want t use your own GIS resources you must author a map (mxd) in ArcGIS Desktop (ArcMap) save it and then click menu File >Share as > Tile Package.

Remember: First layer added to map, set it's spatial reference. Be sure to match tpk WKID with you business data WKID.

Use tile package as described here: Local tiled layer | ArcGIS for Developers

Hope this helps.

Adam

View solution in original post

6 Replies
RussellRoberts1
Esri Frequent Contributor

I would post this under the Java SDK forums here:

ArcGIS Runtime SDK for Java

ErayHANGUL
New Contributor II

Thanks for your redirecting Russell Roberts

0 Kudos
nita14
by
Regular Contributor

Hi Eray,

There are two options:

1) If you want to use small area and create tpk from Esri Basemap on - demand. Check hehe: Creating tpk file

2) If you want t use your own GIS resources you must author a map (mxd) in ArcGIS Desktop (ArcMap) save it and then click menu File >Share as > Tile Package.

Remember: First layer added to map, set it's spatial reference. Be sure to match tpk WKID with you business data WKID.

Use tile package as described here: Local tiled layer | ArcGIS for Developers

Hope this helps.

Adam

ErayHANGUL
New Contributor II

Thanks for your valuable link reference and directions nicinski adam

Regards,

Eray

0 Kudos
ErayHANGUL
New Contributor II

Hi nicinski adam​,

Through the Rest service I could render the *.tpk in offline mode as you decribed. But as you said its zoom level must be little because only 100K items are allowed from the Rest WS source.

So, i installed the ArcGIS Desktop 10.3.1 and when i tried to share as a package as you see from the attachment below there is no option about producing the tpk. The extension is mpk. And i tried to use *.mpk file also tried to change the mpk extension to tpk and use it but no chance to render the saved map at offline mode.

share_as_not_tpk_MPK.PNG

So, what was the ArcGIS Desktop version you used while producing *.tpk file?

Eray

0 Kudos
nita14
by
Regular Contributor

Hi Eray,

First of all, you must check  'Enable ArcGIS Rutime tools' in ArcMap sharing options. Please check the screenshot below. Then author a map and click File >share as > Tile package.

Regards,

Adam