|
60 | 60 | },
|
61 | 61 | {
|
62 | 62 | "cell_type": "code",
|
63 |
| - "execution_count": null, |
| 63 | + "execution_count": 1, |
64 | 64 | "metadata": {},
|
65 |
| - "outputs": [], |
| 65 | + "outputs": [ |
| 66 | + { |
| 67 | + "name": "stdout", |
| 68 | + "output_type": "stream", |
| 69 | + "text": [ |
| 70 | + "Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.\n", |
| 71 | + "Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.\n" |
| 72 | + ] |
| 73 | + }, |
| 74 | + { |
| 75 | + "name": "stderr", |
| 76 | + "output_type": "stream", |
| 77 | + "text": [ |
| 78 | + "/Users/john3092/opt/anaconda3/envs/geosaurus_dev_env/lib/python3.11/site-packages/dask/dataframe/_pyarrow_compat.py:23: UserWarning: You are using pyarrow version 11.0.0 which is known to be insecure. See https://www.cve.org/CVERecord?id=CVE-2023-47248 for further details. Please upgrade to pyarrow>=14.0.1 or install pyarrow-hotfix to patch your current version.\n", |
| 79 | + " warnings.warn(\n" |
| 80 | + ] |
| 81 | + } |
| 82 | + ], |
66 | 83 | "source": [
|
67 | 84 | "from arcgis.gis import GIS"
|
68 | 85 | ]
|
|
374 | 391 | },
|
375 | 392 | {
|
376 | 393 | "cell_type": "code",
|
377 |
| - "execution_count": 1, |
| 394 | + "execution_count": 2, |
378 | 395 | "metadata": {},
|
379 |
| - "outputs": [ |
380 |
| - { |
381 |
| - "name": "stdout", |
382 |
| - "output_type": "stream", |
383 |
| - "text": [ |
384 |
| - "Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.\n", |
385 |
| - "Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.\n" |
386 |
| - ] |
387 |
| - }, |
388 |
| - { |
389 |
| - "name": "stderr", |
390 |
| - "output_type": "stream", |
391 |
| - "text": [ |
392 |
| - "/Users/john3092/opt/anaconda3/envs/geosaurus_dev_env/lib/python3.11/site-packages/dask/dataframe/_pyarrow_compat.py:23: UserWarning: You are using pyarrow version 11.0.0 which is known to be insecure. See https://www.cve.org/CVERecord?id=CVE-2023-47248 for further details. Please upgrade to pyarrow>=14.0.1 or install pyarrow-hotfix to patch your current version.\n", |
393 |
| - " warnings.warn(\n" |
394 |
| - ] |
395 |
| - } |
396 |
| - ], |
| 396 | + "outputs": [], |
397 | 397 | "source": [
|
398 | 398 | "from arcgis.gis import GIS\n",
|
399 |
| - "from arcgis.features import FeatureLayer" |
| 399 | + "from arcgis.layers import Service" |
400 | 400 | ]
|
401 | 401 | },
|
402 | 402 | {
|
403 | 403 | "cell_type": "code",
|
404 |
| - "execution_count": 2, |
| 404 | + "execution_count": 3, |
405 | 405 | "metadata": {},
|
406 | 406 | "outputs": [],
|
407 | 407 | "source": [
|
|
410 | 410 | },
|
411 | 411 | {
|
412 | 412 | "cell_type": "code",
|
413 |
| - "execution_count": 3, |
| 413 | + "execution_count": 45, |
414 | 414 | "metadata": {},
|
415 | 415 | "outputs": [],
|
416 | 416 | "source": [
|
417 |
| - "hurricane_layer = FeatureLayer(\n", |
418 |
| - " url=\"https://sampleserver6.arcgisonline.com/arcgis/rest/services/Hurricanes/MapServer/0\")" |
| 417 | + "hurricane_layer = Service(\n", |
| 418 | + " url_or_item=\"https://sampleserver6.arcgisonline.com/arcgis/rest/services/Hurricanes/MapServer/0\"\n", |
| 419 | + ")" |
419 | 420 | ]
|
420 | 421 | },
|
421 | 422 | {
|
422 | 423 | "cell_type": "code",
|
423 |
| - "execution_count": 4, |
| 424 | + "execution_count": 46, |
424 | 425 | "metadata": {},
|
425 | 426 | "outputs": [],
|
426 | 427 | "source": [
|
|
429 | 430 | },
|
430 | 431 | {
|
431 | 432 | "cell_type": "code",
|
432 |
| - "execution_count": 5, |
| 433 | + "execution_count": 47, |
433 | 434 | "metadata": {},
|
434 | 435 | "outputs": [
|
435 | 436 | {
|
436 | 437 | "data": {
|
437 | 438 | "application/vnd.jupyter.widget-view+json": {
|
438 |
| - "model_id": "df34faa68f024e72895a693f94d04f51", |
| 439 | + "model_id": "814ae58630a447f2bc1d7a99ede4674c", |
439 | 440 | "version_major": 2,
|
440 | 441 | "version_minor": 1
|
441 | 442 | },
|
442 | 443 | "text/plain": [
|
443 | 444 | "Map(center=[3716583.6647425774, -4155920.0458218013], extent={'xmin': -8511072.484127043, 'ymin': -835007.2772…"
|
444 | 445 | ]
|
445 | 446 | },
|
446 |
| - "execution_count": 5, |
| 447 | + "execution_count": 47, |
447 | 448 | "metadata": {},
|
448 | 449 | "output_type": "execute_result"
|
449 | 450 | }
|
|
455 | 456 | },
|
456 | 457 | {
|
457 | 458 | "cell_type": "code",
|
458 |
| - "execution_count": 6, |
| 459 | + "execution_count": 48, |
459 | 460 | "metadata": {},
|
460 | 461 | "outputs": [],
|
461 | 462 | "source": [
|
|
471 | 472 | },
|
472 | 473 | {
|
473 | 474 | "cell_type": "code",
|
474 |
| - "execution_count": 7, |
| 475 | + "execution_count": 9, |
475 | 476 | "metadata": {},
|
476 | 477 | "outputs": [],
|
477 | 478 | "source": [
|
|
480 | 481 | },
|
481 | 482 | {
|
482 | 483 | "cell_type": "code",
|
483 |
| - "execution_count": 8, |
| 484 | + "execution_count": 10, |
484 | 485 | "metadata": {},
|
485 | 486 | "outputs": [],
|
486 | 487 | "source": [
|
|
489 | 490 | },
|
490 | 491 | {
|
491 | 492 | "cell_type": "code",
|
492 |
| - "execution_count": 10, |
| 493 | + "execution_count": 11, |
493 | 494 | "metadata": {},
|
494 | 495 | "outputs": [],
|
495 | 496 | "source": [
|
|
498 | 499 | },
|
499 | 500 | {
|
500 | 501 | "cell_type": "code",
|
501 |
| - "execution_count": 11, |
| 502 | + "execution_count": 59, |
502 | 503 | "metadata": {},
|
503 | 504 | "outputs": [],
|
504 | 505 | "source": [
|
505 |
| - "renderer = renderers.SimpleRenderer(\n", |
506 |
| - " symbol=symbols.SimpleMarkerSymbolEsriSMS(\n", |
507 |
| - " style=\"esriSMSCircle\", color=[255, 0, 0, 1], size=20\n", |
508 |
| - " )\n", |
| 506 | + "os3d_layer = symbols.ObjectSymbol3DLayer(\n", |
| 507 | + " resource=symbols.ObjectSymbol3DLayerResource(primitive=symbols.Primitive.sphere),\n", |
| 508 | + " material=symbols.Material(color=[255,0,0]),\n", |
| 509 | + " type=\"Object\",\n", |
| 510 | + " width=100\n", |
509 | 511 | ")"
|
510 | 512 | ]
|
511 | 513 | },
|
512 | 514 | {
|
513 | 515 | "cell_type": "code",
|
514 |
| - "execution_count": 13, |
| 516 | + "execution_count": 62, |
| 517 | + "metadata": {}, |
| 518 | + "outputs": [], |
| 519 | + "source": [ |
| 520 | + "pt3d_symbol = symbols.PointSymbol3D(\n", |
| 521 | + " symbol_layers = [os3d_layer]\n", |
| 522 | + ")" |
| 523 | + ] |
| 524 | + }, |
| 525 | + { |
| 526 | + "cell_type": "code", |
| 527 | + "execution_count": 64, |
| 528 | + "metadata": {}, |
| 529 | + "outputs": [ |
| 530 | + { |
| 531 | + "ename": "ValidationError", |
| 532 | + "evalue": "1 validation error for PointSymbol3D\nsymbolLayers\n Field required [type=missing, input_value={'symbol': PointSymbol3D(...'type': 'PointSymbol3D'}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.5/v/missing", |
| 533 | + "output_type": "error", |
| 534 | + "traceback": [ |
| 535 | + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
| 536 | + "\u001b[0;31mValidationError\u001b[0m Traceback (most recent call last)", |
| 537 | + "Cell \u001b[0;32mIn[64], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m pt3d_renderer \u001b[38;5;241m=\u001b[39m renderers\u001b[38;5;241m.\u001b[39mPointSymbol3D(\n\u001b[1;32m 2\u001b[0m symbol\u001b[38;5;241m=\u001b[39mpt3d_symbol,\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28mtype\u001b[39m\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mPointSymbol3D\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 4\u001b[0m )\n", |
| 538 | + "File \u001b[0;32m~/opt/anaconda3/envs/geosaurus_dev_env/lib/python3.11/site-packages/pydantic/main.py:164\u001b[0m, in \u001b[0;36mBaseModel.__init__\u001b[0;34m(__pydantic_self__, **data)\u001b[0m\n\u001b[1;32m 162\u001b[0m \u001b[38;5;66;03m# `__tracebackhide__` tells pytest and some other tools to omit this function from tracebacks\u001b[39;00m\n\u001b[1;32m 163\u001b[0m __tracebackhide__ \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[0;32m--> 164\u001b[0m __pydantic_self__\u001b[38;5;241m.\u001b[39m__pydantic_validator__\u001b[38;5;241m.\u001b[39mvalidate_python(data, self_instance\u001b[38;5;241m=\u001b[39m__pydantic_self__)\n", |
| 539 | + "\u001b[0;31mValidationError\u001b[0m: 1 validation error for PointSymbol3D\nsymbolLayers\n Field required [type=missing, input_value={'symbol': PointSymbol3D(...'type': 'PointSymbol3D'}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.5/v/missing" |
| 540 | + ] |
| 541 | + } |
| 542 | + ], |
| 543 | + "source": [ |
| 544 | + "pt3d_renderer = renderers.PointSymbol3D(\n", |
| 545 | + " symbol=pt3d_symbol,\n", |
| 546 | + " type=\"PointSymbol3D\"\n", |
| 547 | + ")" |
| 548 | + ] |
| 549 | + }, |
| 550 | + { |
| 551 | + "cell_type": "code", |
| 552 | + "execution_count": 51, |
515 | 553 | "metadata": {},
|
516 | 554 | "outputs": [
|
| 555 | + { |
| 556 | + "name": "stderr", |
| 557 | + "output_type": "stream", |
| 558 | + "text": [ |
| 559 | + "ERROR:root:Renderer of type PointSymbol3D could not be created. Error: 2 validation errors for SimpleRenderer\n", |
| 560 | + "symbol\n", |
| 561 | + " Field required [type=missing, input_value={'symbolLayers': [{'ancho...'type': 'PointSymbol3D'}, input_type=dict]\n", |
| 562 | + " For further information visit https://errors.pydantic.dev/2.5/v/missing\n", |
| 563 | + "type\n", |
| 564 | + " Input should be 'simple' [type=literal_error, input_value='PointSymbol3D', input_type=str]\n", |
| 565 | + " For further information visit https://errors.pydantic.dev/2.5/v/literal_error\n" |
| 566 | + ] |
| 567 | + }, |
517 | 568 | {
|
518 | 569 | "ename": "ValidationError",
|
519 | 570 | "evalue": "1 validation error for FeatureLayerArcGISFeatureLayer\nlayerDefinition.timeInfo.timeIntervalUnits\n Input should be 'esriTimeUnitsCenturies', 'esriTimeUnitsDays', 'esriTimeUnitsDecades', 'esriTimeUnitsHours', 'esriTimeUnitsMilliseconds', 'esriTimeUnitsMinutes', 'esriTimeUnitsMonths', 'esriTimeUnitsSeconds', 'esriTimeUnitsUnknown', 'esriTimeUnitsWeeks' or 'esriTimeUnitsYears' [type=enum, input_value=<TimeIntervalUnits.esri_t...ys: 'esriTimeUnitsDays'>, input_type=TimeIntervalUnits]",
|
520 | 571 | "output_type": "error",
|
521 | 572 | "traceback": [
|
522 | 573 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
523 | 574 | "\u001b[0;31mValidationError\u001b[0m Traceback (most recent call last)",
|
524 |
| - "Cell \u001b[0;32mIn[13], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m hurricane_map_3D\u001b[38;5;241m.\u001b[39mcontent\u001b[38;5;241m.\u001b[39madd(\n\u001b[1;32m 2\u001b[0m item\u001b[38;5;241m=\u001b[39mhurricane_layer,\n\u001b[1;32m 3\u001b[0m drawing_info \u001b[38;5;241m=\u001b[39m {\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrenderer\u001b[39m\u001b[38;5;124m\"\u001b[39m: renderer\n\u001b[1;32m 5\u001b[0m }\n\u001b[1;32m 6\u001b[0m )\n", |
525 |
| - "File \u001b[0;32m~/opt/anaconda3/envs/geosaurus_dev_env/lib/python3.11/site-packages/arcgis/map/scene_widget.py:1327\u001b[0m, in \u001b[0;36mSceneContent.add\u001b[0;34m(self, item, drawing_info, popup_info, index)\u001b[0m\n\u001b[1;32m 1324\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m\n\u001b[1;32m 1325\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 1326\u001b[0m \u001b[38;5;66;03m# Only one layer, create the layer and add\u001b[39;00m\n\u001b[0;32m-> 1327\u001b[0m layer \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_helper\u001b[38;5;241m.\u001b[39m_create_layer_from_item(item, drawing_info, popup_info)\n\u001b[1;32m 1328\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlayers\u001b[38;5;241m.\u001b[39minsert(index, item)\n\u001b[1;32m 1330\u001b[0m \u001b[38;5;66;03m# Check that layer is not None at this point\u001b[39;00m\n", |
526 |
| - "File \u001b[0;32m~/opt/anaconda3/envs/geosaurus_dev_env/lib/python3.11/site-packages/arcgis/map/_utils.py:1048\u001b[0m, in \u001b[0;36m_HelperMethods._create_layer_from_item\u001b[0;34m(self, layer, drawing_info, popup_info)\u001b[0m\n\u001b[1;32m 1046\u001b[0m ld \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1047\u001b[0m popup \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_create_popup_dataclass(layer, popup_info)\n\u001b[0;32m-> 1048\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mspec\u001b[38;5;241m.\u001b[39mFeatureLayerArcGISFeatureLayer(\n\u001b[1;32m 1049\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mproperties,\n\u001b[1;32m 1050\u001b[0m url\u001b[38;5;241m=\u001b[39mlayer\u001b[38;5;241m.\u001b[39m_url,\n\u001b[1;32m 1051\u001b[0m layerDefinition\u001b[38;5;241m=\u001b[39mld,\n\u001b[1;32m 1052\u001b[0m popupInfo\u001b[38;5;241m=\u001b[39mpopup,\n\u001b[1;32m 1053\u001b[0m itemId\u001b[38;5;241m=\u001b[39mitem_id,\n\u001b[1;32m 1054\u001b[0m title\u001b[38;5;241m=\u001b[39mproperties[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m\"\u001b[39m],\n\u001b[1;32m 1055\u001b[0m )\n\u001b[1;32m 1056\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(layer, arcgis_layers\u001b[38;5;241m.\u001b[39mVectorTileLayer):\n\u001b[1;32m 1057\u001b[0m style_url \u001b[38;5;241m=\u001b[39m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mlayer\u001b[38;5;241m.\u001b[39m_url\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m/resources/styles/root.json\u001b[39m\u001b[38;5;124m\"\u001b[39m\n", |
| 575 | + "Cell \u001b[0;32mIn[51], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m hurricane_map_3D\u001b[38;5;241m.\u001b[39mcontent\u001b[38;5;241m.\u001b[39madd(\n\u001b[1;32m 2\u001b[0m item\u001b[38;5;241m=\u001b[39mhurricane_layer,\n\u001b[1;32m 3\u001b[0m drawing_info\u001b[38;5;241m=\u001b[39m{\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrenderer\u001b[39m\u001b[38;5;124m\"\u001b[39m: pt3d_renderer\n\u001b[1;32m 5\u001b[0m }\n\u001b[1;32m 6\u001b[0m )\n", |
| 576 | + "File \u001b[0;32m~/opt/anaconda3/envs/geosaurus_dev_env/lib/python3.11/site-packages/arcgis/map/scene_widget.py:920\u001b[0m, in \u001b[0;36mSceneContent.add\u001b[0;34m(self, item, drawing_info, popup_info, index)\u001b[0m\n\u001b[1;32m 917\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m\n\u001b[1;32m 918\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 919\u001b[0m \u001b[38;5;66;03m# Only one layer, create the layer and add\u001b[39;00m\n\u001b[0;32m--> 920\u001b[0m layer \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_helper\u001b[38;5;241m.\u001b[39m_create_layer_from_item(item, drawing_info, popup_info)\n\u001b[1;32m 921\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mlayers\u001b[38;5;241m.\u001b[39minsert(index, item)\n\u001b[1;32m 923\u001b[0m \u001b[38;5;66;03m# Check that layer is not None at this point\u001b[39;00m\n", |
| 577 | + "File \u001b[0;32m~/opt/anaconda3/envs/geosaurus_dev_env/lib/python3.11/site-packages/arcgis/map/_utils.py:1053\u001b[0m, in \u001b[0;36m_HelperMethods._create_layer_from_item\u001b[0;34m(self, layer, drawing_info, popup_info)\u001b[0m\n\u001b[1;32m 1051\u001b[0m ld \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1052\u001b[0m popup \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_create_popup_dataclass(layer, popup_info)\n\u001b[0;32m-> 1053\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mspec\u001b[38;5;241m.\u001b[39mFeatureLayerArcGISFeatureLayer(\n\u001b[1;32m 1054\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mproperties,\n\u001b[1;32m 1055\u001b[0m url\u001b[38;5;241m=\u001b[39mlayer\u001b[38;5;241m.\u001b[39m_url,\n\u001b[1;32m 1056\u001b[0m layerDefinition\u001b[38;5;241m=\u001b[39mld,\n\u001b[1;32m 1057\u001b[0m popupInfo\u001b[38;5;241m=\u001b[39mpopup,\n\u001b[1;32m 1058\u001b[0m itemId\u001b[38;5;241m=\u001b[39mitem_id,\n\u001b[1;32m 1059\u001b[0m title\u001b[38;5;241m=\u001b[39mproperties[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m\"\u001b[39m],\n\u001b[1;32m 1060\u001b[0m )\n\u001b[1;32m 1061\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(layer, arcgis_layers\u001b[38;5;241m.\u001b[39mVectorTileLayer):\n\u001b[1;32m 1062\u001b[0m style_url \u001b[38;5;241m=\u001b[39m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mlayer\u001b[38;5;241m.\u001b[39m_url\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m/resources/styles/root.json\u001b[39m\u001b[38;5;124m\"\u001b[39m\n", |
527 | 578 | "File \u001b[0;32m~/opt/anaconda3/envs/geosaurus_dev_env/lib/python3.11/site-packages/pydantic/main.py:164\u001b[0m, in \u001b[0;36mBaseModel.__init__\u001b[0;34m(__pydantic_self__, **data)\u001b[0m\n\u001b[1;32m 162\u001b[0m \u001b[38;5;66;03m# `__tracebackhide__` tells pytest and some other tools to omit this function from tracebacks\u001b[39;00m\n\u001b[1;32m 163\u001b[0m __tracebackhide__ \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[0;32m--> 164\u001b[0m __pydantic_self__\u001b[38;5;241m.\u001b[39m__pydantic_validator__\u001b[38;5;241m.\u001b[39mvalidate_python(data, self_instance\u001b[38;5;241m=\u001b[39m__pydantic_self__)\n",
|
528 | 579 | "\u001b[0;31mValidationError\u001b[0m: 1 validation error for FeatureLayerArcGISFeatureLayer\nlayerDefinition.timeInfo.timeIntervalUnits\n Input should be 'esriTimeUnitsCenturies', 'esriTimeUnitsDays', 'esriTimeUnitsDecades', 'esriTimeUnitsHours', 'esriTimeUnitsMilliseconds', 'esriTimeUnitsMinutes', 'esriTimeUnitsMonths', 'esriTimeUnitsSeconds', 'esriTimeUnitsUnknown', 'esriTimeUnitsWeeks' or 'esriTimeUnitsYears' [type=enum, input_value=<TimeIntervalUnits.esri_t...ys: 'esriTimeUnitsDays'>, input_type=TimeIntervalUnits]"
|
529 | 580 | ]
|
|
532 | 583 | "source": [
|
533 | 584 | "hurricane_map_3D.content.add(\n",
|
534 | 585 | " item=hurricane_layer,\n",
|
535 |
| - " drawing_info = {\n", |
536 |
| - " \"renderer\": renderer\n", |
| 586 | + " drawing_info={\n", |
| 587 | + " \"renderer\": pt3d_renderer\n", |
537 | 588 | " }\n",
|
538 | 589 | ")"
|
539 | 590 | ]
|
540 | 591 | },
|
| 592 | + { |
| 593 | + "cell_type": "code", |
| 594 | + "execution_count": 52, |
| 595 | + "metadata": {}, |
| 596 | + "outputs": [ |
| 597 | + { |
| 598 | + "data": { |
| 599 | + "application/vnd.jupyter.widget-view+json": { |
| 600 | + "model_id": "81ec8d571d1443c19a7a73503d3d98e4", |
| 601 | + "version_major": 2, |
| 602 | + "version_minor": 1 |
| 603 | + }, |
| 604 | + "text/plain": [ |
| 605 | + "Scene(camera={'heading': 0.0, 'position': {'spatialReference': {'latestWkid': 3857, 'wkid': 102100}, 'x': -415…" |
| 606 | + ] |
| 607 | + }, |
| 608 | + "execution_count": 52, |
| 609 | + "metadata": {}, |
| 610 | + "output_type": "execute_result" |
| 611 | + } |
| 612 | + ], |
| 613 | + "source": [ |
| 614 | + "hurricane_map_3D" |
| 615 | + ] |
| 616 | + }, |
541 | 617 | {
|
542 | 618 | "cell_type": "markdown",
|
543 | 619 | "metadata": {},
|
|
603 | 679 | "cell_type": "markdown",
|
604 | 680 | "metadata": {},
|
605 | 681 | "source": [
|
606 |
| - "Another new feature in 1.5.0 is the ability to export the current widget as a standalone HTML file. This added functionality provides a new workflow for creating standalone HTML maps that can be shared with anyone: all they need is a web browser!\n", |
| 682 | + "You als have the ability to export the current widget as a standalone HTML file. This added functionality provides a workflow for creating standalone HTML maps that can be shared with anyone: all they need is a web browser!\n", |
607 | 683 | "\n",
|
608 | 684 | "The below cell will write the current widget to the file specified by a string path. Run the cell, find the file on your disk, and open it in your favorite web browser.\n",
|
609 | 685 | "\n",
|
|
612 | 688 | },
|
613 | 689 | {
|
614 | 690 | "cell_type": "code",
|
615 |
| - "execution_count": null, |
| 691 | + "execution_count": 66, |
616 | 692 | "metadata": {},
|
617 |
| - "outputs": [], |
| 693 | + "outputs": [ |
| 694 | + { |
| 695 | + "name": "stdout", |
| 696 | + "output_type": "stream", |
| 697 | + "text": [ |
| 698 | + "html saved as /Users/john3092/Job/data_formats/html_pages/myHurricaneMap.html\n" |
| 699 | + ] |
| 700 | + } |
| 701 | + ], |
618 | 702 | "source": [
|
619 | 703 | "import os\n",
|
620 | 704 | "\n",
|
621 |
| - "file_dir = os.path.join(os.getcwd(), 'home')\n", |
| 705 | + "file_dir = r\"/Users/john3092/Job/data_formats/html_pages\"\n", |
622 | 706 | "if not os.path.isdir(file_dir):\n",
|
623 | 707 | " os.mkdir(file_dir)\n",
|
624 | 708 | " \n",
|
625 | 709 | "file_path = os.path.join(file_dir, 'myHurricaneMap.html')\n",
|
626 | 710 | "\n",
|
627 |
| - "visual_var_map.export_to_html(file_path)\n", |
| 711 | + "hurricane_map.export_to_html(\n", |
| 712 | + " path_to_file=file_path\n", |
| 713 | + ")\n", |
628 | 714 | "print(\"html saved as \" + file_path) # On Windows, path can be 'C:\\Users\\Username\\Documents\\home\\myHurricaneMap.html'"
|
629 | 715 | ]
|
630 | 716 | }
|
|
0 commit comments