Skip To Content
ArcGIS Developers
Dashboard

Create Kmz

Description

This operation creates a new KMZ file from the input KML file uploaded to the server. The created KMZ file is available in the server system directory in the uploads folder.

Note:

For more information on what KML functionality is supported with ArcGIS Enterprise, see KML support in ArcGIS Server and KML.

Request parameters

ParameterDescription
kml

The KML file in JSON format.

f

The response format. The default response format is html.

Values: html | json

Example usage

Below is a sample POST request for createKmz, formatted for readability:

POST /webadaptor/admin/kml/createKmz HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

kml={
  "kml": "https://earth.google.com/kml/2.2",
  "NetworkLink": {
    "name": "kmzdoc2",
    "flyToView": 0,
    "visibility": 0,
    "description": "KML Document",
    "open": 1,
    "LookAt": {
      "longitude": 16.937705993652344,
      "latitude": 1.2083547307380726,
      "altitude": 0,
      "range": 8716076.470664795,
      "tilt": 0,
      "heading": 0,
      "altitudeMode": "relativeToGround"
    },
    "Link": {
      "href": "https://obie:8399/arcgis/services/Africa/MapServer/KmlServer?Composite=true&compatabilityMode=GoogleEarth",
      "refreshMode": "onChange",
      "refreshInterval": 4,
      "viewRefreshMode": "onStop",
      "viewBoundsScale": 1,
      "viewRefreshTime": 2,
      "viewFormat": "BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth];CAMERA=[lookatLon],[lookatLat],[lookatRange],[lookatTilt],[lookatHeading];VIEW=[horizFov],[vertFov],[horizPixels],[vertPixels],[terrainEnabled]"
    }
  }
}&f=json

JSON Response example

{"status": "success"}