Create Kmz

  • URL:http://server:port/arcgis/admin/kml/createKmz(POST only)
  • Required Capability:Publisher or Administrator
  • Version Introduced:10.1

Description

Creates a new KMZ file on the Server from the input KML file. The created KMZ file is available in the server system directory in the uploads folder.

Parameters

ParameterDescription
kml

The kml file in JSON format.

f

The response format. The default response format is html.

Values: html | json

Request Format

http://server:port/arcgis/admin/kml/createKmz
	kml=<kml_in_json_format>

Example

http://server:port/arcgis/admin/kml/createKmz
	kml={
	"kml": {
		"kml": "http://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": "http://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]"
			}
		}
	}
}