Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Commit

Permalink
added sample for registering a layer
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMillerGIS committed Sep 10, 2014
1 parent d743811 commit 5729e2a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions samples/_register_maplayer_as_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

"""
Updating a feature layer, OBJECTID must
be included in the features.
"""
import json

from arcrest.agol import admin

if __name__ == "__main__":
try:
agol = admin.AGOL(username='',password='')
inparams = {"url":"http://IPADDRESS/arcgis/rest/services/Sanitary_Sewer_Infrastructure/Sanitary_Sewer_Network/MapServer/6"}

res = agol.addItem(name="TestForMark",
tags="Test",
description="Test",
snippet="test",
data=None,
extent="-88.1799,41.7718,-88.1353,41.7823",
item_type="Feature Service",
folder=None,
inparams=inparams,
typeKeywords=["Data", "Service", "Feature Service", "ArcGIS Server", "Feature Access"]
)

print res
except ValueError, e:
print e

0 comments on commit 5729e2a

Please sign in to comment.