diff --git a/notebooks/mimerenderers.ipynb b/notebooks/mimerenderers.ipynb index 32243b7bf..e8116a73e 100644 --- a/notebooks/mimerenderers.ipynb +++ b/notebooks/mimerenderers.ipynb @@ -83,6 +83,50 @@ "fasta_output" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# GeoJSON" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from IPython.display import GeoJSON\n", + "\n", + "\n", + "geojson_button = Button(description='Output GeoJSON')\n", + "geojson_output = Output()\n", + "\n", + " \n", + "@geojson_output.capture()\n", + "def on_click(change):\n", + " obj = GeoJSON({\n", + " \"type\": \"Feature\",\n", + " \"geometry\": {\n", + " \"type\": \"Point\",\n", + " \"coordinates\": [-118.4563712, 34.0163116]\n", + " }\n", + " })\n", + " display.display(obj)\n", + " \n", + "\n", + "geojson_button.on_click(on_click)\n", + "display.display(geojson_button)\n", + "geojson_output" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": null,