diff --git a/samples/_register_maplayer_as_item.py b/samples/_register_maplayer_as_item.py new file mode 100644 index 0000000..39eb840 --- /dev/null +++ b/samples/_register_maplayer_as_item.py @@ -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 \ No newline at end of file