diff --git a/samples/05_content_publishers/overwriting_feature_layers.ipynb b/samples/05_content_publishers/overwriting_feature_layers.ipynb index 14a48aabdd..0b477baf98 100644 --- a/samples/05_content_publishers/overwriting_feature_layers.ipynb +++ b/samples/05_content_publishers/overwriting_feature_layers.ipynb @@ -329,8 +329,9 @@ ], "source": [ "# add the csv as an item\n", - "item_prop = {'title':'USA Capitals spreadsheet_' + str(now)}\n", - "csv_item = gis.content.add(item_properties=item_prop, data=my_csv)\n", + "item_prop = {'title':'USA Capitals spreadsheet_' + str(now), \"type\": \"CSV\"}\n", + "root_folder = gis.content.folders.get()\n", + "csv_item = root_folder.add(item_properties=item_prop, file=my_csv).result()\n", "csv_item" ] }, @@ -474,7 +475,7 @@ "metadata": {}, "outputs": [], "source": [ - "map1.add_layer(cities_item)" + "map1.content.add(cities_item)" ] }, { @@ -905,7 +906,10 @@ { "cell_type": "markdown", "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "source": [ "### Access the overwritten feature layer\n", @@ -978,7 +982,7 @@ "metadata": {}, "outputs": [], "source": [ - "map2.add_layer(cities_item)" + "map2.content.add(cities_item)" ] }, { @@ -1018,7 +1022,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.18" + "version": "3.11.0" }, "toc": { "base_numbering": 1, @@ -1035,5 +1039,5 @@ } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 }