现在的位置: 首页 > 综合 > 正文

Generate Mobile Service Cache (Mobile)

2013年11月12日 ⁄ 综合 ⁄ 共 4713字 ⁄ 字号 评论关闭
文章目录

Generate Mobile Service Cache (Mobile)

Release 9.3
Last modified May 9, 2008

Generates a mobile service cache ready for use with ArcGIS Mobile applications. Given a defined extent, the Generate Mobile Service Cache tool extracts selected operational vector and basemap raster layers from a mobile data access enabled ArcGIS Server Map Service and generates a mobile service cache that can then be deployed to mobile devices.

NOTE: Tool is only available for use with Microsoft Windows operating system.

Usage tips

  • Only ArcGIS Server Map Services which have been published with mobile data access capabilities can be used by this tool.

  • The selected ArcGIS Server Map Service should contain references to all operational vector layers and basemap raster layers to be used by the mobile device. Operational data refers to data that will be synchronized between a mobile device and a server; basemap data refers to data used for reference/orientation purposes only.

  • Only vector layers based on enterprise geodatabase data sources can be synchronized between the mobile device and the ArcGIS Server.

  • The output folder must exist prior to tool execution.

  • By default the extent that is extracted is based on the map services' initial map extent; this can be overridden by using the override extract extent parameter.

  • Output from the tool consists of the following files which are deployed to the mobile device:

    • One map schema file (MapSchema.bin). This file contains the schema of the mobile map service. It includes information such as what layers are contained in the mobile map service, the layer order and whether the layers are visible.

    • One or more mobile cache files (<filename>.bin). A mobile cache file is generated for each layer in the mobile map service regardless of whether the user has chosen to generate a cache for the layer. If the user has chosen that a cache be generated for a layer then the generated cache file will contain both the cache and the schema of the layer; otherwise, the cache file will only contain the schema of the layer. The name of the cache file is based on the layer name concatenated with the layer order number starting at 0.
  • This tool does not accept any Environment Settings that have been specified.

Command line syntax
An overview of the Command Line window
GenerateMobileServiceCache_mobile <map_service> <out_folder> {override_extract_extent} {in_layer; in_layer...} {in_version} {NO_ERASE|ERASE}

Parameter Explanation Data Type
<map_service>

The Map Service with mobile data access capability to use to generate the cache.

MapService
<out_folder>

The parent directory for this Map Service cache.

Folder
{override_extract_extent}

The extent defining the area to be extracted; overrides the default extract extent.

Extent
{in_layer; in_layer...}

The names of the layers to extract.

String
{in_version}

The geodatabase version from which the cache will be generated.

String
{NO_ERASE|ERASE}

Clear output folder before processing.

Boolean

Data types for geoprocessing tool parameters

Command line example

The following command generates a mobile cache file for each layer contained within the "Redlands" mobile map service:
GenerateMobileServiceCache_mobile 'GIS Servers/arcgis on myServer/Redlands.MapServer'  C:/Mobile/DeploymentPackages/Redlands
The following command generates a mobile cache file for a specific layer contained within the "Redlands" mobile map service and override the default extract extent:
GenerateMobileServiceCache_mobile 'GIS Servers/arcgis on myServer/Redlands.MapServer' C:/Mobile/DeploymentPackages/Redlands '-117.274738 34.001452 -117.1115 34.135168' 'Rail Road'

Scripting syntax
About getting started with writing geoprocessing scripts
GenerateMobileServiceCache_mobile (map_service, out_folder, override_extract_extent, in_layer, in_version, in_erase_output)

Parameter Explanation Data Type
map_service (Required)

The Map Service with mobile data access capability to use to generate the cache.

MapService
out_folder (Required)

The parent directory for this Map Service cache.

Folder
override_extract_extent (Optional)

The extent defining the area to be extracted; overrides the default extract extent.

Extent
in_layer (Optional)

The names of the layers to extract.

String
in_version (Optional)

The geodatabase version from which the cache will be generated.

String
in_erase_output (Optional)

Clear output folder before processing.

Boolean

Data types for geoprocessing tool parameters

Script example

# Example 1:
#   Generate a mobile cache file for each layer contained within the "Redlands" mobile map service.

import arcgisscripting
GP = arcgisscripting.create()

try:
    map_service = "GIS Servers/arcgis on myServer/Redlands.MapServer"
    output_folder = "C:/Mobile/DeploymentPackages/Redlands"
    GP.GenerateMobileServiceCache(map_service, output_folder)
    print GP.GetMessages()

except:
    print GP.GetMessages(2)


# Example 2:
#   Generate a mobile cache file for a specific layer contained within the "Redlands mobile map
#   service and override the default extract extent.

import arcgisscripting
GP = arcgisscripting.create()

try:
    map_service = "GIS Servers/arcgis on myServer/Redlands.MapServer"
    output_folder = "C:/Mobile/DeploymentPackages/Redlands"
    override_extract_extent = "-117.274738 34.001452 -117.1115 34.135168"
    layers = "Rail Road"
    GP.GenerateMobileServiceCache(map_service, output_folder, override_extract_extent, layers)
    print GP.GetMessages()

except:
    print GP.GetMessages(2)

抱歉!评论已关闭.