Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.4.0 map widget changes to temperature forecast sample #2162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
Copy link
Collaborator

@jyaistMap jyaistMap Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the england_map.zoom = 6from these lines and place it in a cell below the map by itself.


Reply via ReviewNB

Copy link
Collaborator

@jyaistMap jyaistMap Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • same comment. Setting the zoom level before the map is rendered does not recognize the value, but instead uses a default zoom level based on location information.

Reply via ReviewNB

Copy link
Collaborator

@jyaistMap jyaistMap Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the eng_interpolated_temp.zoom = 6line to a cell below the rendered map.


Reply via ReviewNB

{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -92,7 +92,6 @@
"import tensorflow.keras.backend as K\n",
"\n",
"from arcgis.gis import GIS\n",
"from arcgis.features import SpatialDataFrame\n",
"from arcgis.features.analysis import interpolate_points"
]
},
Expand All @@ -105,7 +104,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -131,7 +130,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand All @@ -147,9 +146,9 @@
" <div class=\"item_right\" style=\"float: none; width: auto; overflow: hidden;\">\n",
" <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=0856d38fea9149a48227cdc2f1e4f4f6' target='_blank'><b>england1</b>\n",
" </a>\n",
" <br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/featureshosted16.png' style=\"vertical-align:middle;\">Feature Layer Collection by api_data_owner\n",
" <br/><br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/featureshosted16.png' style=\"vertical-align:middle;\" width=16 height=16>Feature Layer Collection by api_data_owner\n",
" <br/>Last Modified: December 17, 2019\n",
" <br/>0 comments, 22 views\n",
" <br/>0 comments, 59 views\n",
" </div>\n",
" </div>\n",
" "
Expand All @@ -158,7 +157,7 @@
"<Item title:\"england1\" type:Feature Layer Collection owner:api_data_owner>"
]
},
"execution_count": 6,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -171,7 +170,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -199,8 +198,9 @@
],
"source": [
"# Plot England boundary\n",
"england_map = gis.map('England', zoomlevel=6)\n",
"england_map.add_layer(england_boundary_layer)\n",
"england_map = gis.map('England')\n",
"england_map.zoom = 6\n",
"england_map.content.add(england_boundary_layer)\n",
"england_map"
]
},
Expand All @@ -215,7 +215,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand All @@ -231,9 +231,9 @@
" <div class=\"item_right\" style=\"float: none; width: auto; overflow: hidden;\">\n",
" <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=fd3ecbd95b7148b8a7cbcc866cedd514' target='_blank'><b>england_weather_stations1</b>\n",
" </a>\n",
" <br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/featureshosted16.png' style=\"vertical-align:middle;\">Feature Layer Collection by api_data_owner\n",
" <br/><br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/featureshosted16.png' style=\"vertical-align:middle;\" width=16 height=16>Feature Layer Collection by api_data_owner\n",
" <br/>Last Modified: December 20, 2019\n",
" <br/>0 comments, 5 views\n",
" <br/>0 comments, 34 views\n",
" </div>\n",
" </div>\n",
" "
Expand All @@ -242,7 +242,7 @@
"<Item title:\"england_weather_stations1\" type:Feature Layer Collection owner:api_data_owner>"
]
},
"execution_count": 8,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -255,7 +255,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -282,8 +282,9 @@
],
"source": [
"# England weather stations\n",
"england_weather_stations_map = gis.map('England', zoomlevel=6)\n",
"england_weather_stations_map.add_layer(england_weather_stations_layer)\n",
"england_weather_stations_map = gis.map('England')\n",
"england_weather_stations_map.zoom = 6\n",
"england_weather_stations_map.content.add(england_weather_stations_layer)\n",
"england_weather_stations_map"
]
},
Expand All @@ -296,17 +297,9 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Supratim\\Anaconda3\\envs\\deeply_mad\\lib\\site-packages\\arcgis\\features\\layer.py:1995: FutureWarning: The pandas.datetime class is deprecated and will be removed from pandas in a future version. Import from datetime module instead.\n",
" \"esriFieldTypeDate\" : pd.datetime,\n"
]
},
{
"data": {
"text/html": [
Expand Down Expand Up @@ -342,39 +335,39 @@
" <td>Albemarle</td>\n",
" <td>55.016667</td>\n",
" <td>-1.866667</td>\n",
" <td>{'x': -207796.38285121127, 'y': 7365101.445978...</td>\n",
" <td>{\"x\": -207796.38285121127, \"y\": 7365101.445978...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>Begwary</td>\n",
" <td>52.216667</td>\n",
" <td>-0.483333</td>\n",
" <td>{'x': -53804.420512971476, 'y': 6839396.777444...</td>\n",
" <td>{\"x\": -53804.420512971476, \"y\": 6839396.777444...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>Birmingham_airport</td>\n",
" <td>52.450000</td>\n",
" <td>52.45</td>\n",
" <td>-1.733333</td>\n",
" <td>{'x': -192953.78400456344, 'y': 6881903.804921...</td>\n",
" <td>{\"x\": -192953.78400456344, \"y\": 6881903.804921...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>Blackpool_airport</td>\n",
" <td>53.766667</td>\n",
" <td>-3.033333</td>\n",
" <td>{'x': -337669.1220358203, 'y': 7126089.0211904...</td>\n",
" <td>{\"x\": -337669.1220358203, \"y\": 7126089.0211904...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5</td>\n",
" <td>Boulmer_airport</td>\n",
" <td>55.420300</td>\n",
" <td>-1.599700</td>\n",
" <td>{'x': -178077.78942199165, 'y': 7443868.808735...</td>\n",
" <td>55.4203</td>\n",
" <td>-1.5997</td>\n",
" <td>{\"x\": -178077.78942199165, \"y\": 7443868.808735...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
Expand All @@ -384,19 +377,19 @@
" FID Station Y X \\\n",
"0 1 Albemarle 55.016667 -1.866667 \n",
"1 2 Begwary 52.216667 -0.483333 \n",
"2 3 Birmingham_airport 52.450000 -1.733333 \n",
"2 3 Birmingham_airport 52.45 -1.733333 \n",
"3 4 Blackpool_airport 53.766667 -3.033333 \n",
"4 5 Boulmer_airport 55.420300 -1.599700 \n",
"4 5 Boulmer_airport 55.4203 -1.5997 \n",
"\n",
" SHAPE \n",
"0 {'x': -207796.38285121127, 'y': 7365101.445978... \n",
"1 {'x': -53804.420512971476, 'y': 6839396.777444... \n",
"2 {'x': -192953.78400456344, 'y': 6881903.804921... \n",
"3 {'x': -337669.1220358203, 'y': 7126089.0211904... \n",
"4 {'x': -178077.78942199165, 'y': 7443868.808735... "
"0 {\"x\": -207796.38285121127, \"y\": 7365101.445978... \n",
"1 {\"x\": -53804.420512971476, \"y\": 6839396.777444... \n",
"2 {\"x\": -192953.78400456344, \"y\": 6881903.804921... \n",
"3 {\"x\": -337669.1220358203, \"y\": 7126089.0211904... \n",
"4 {\"x\": -178077.78942199165, \"y\": 7443868.808735... "
]
},
"execution_count": 11,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -3980,9 +3973,10 @@
],
"source": [
"# Plot the interpolated temperature surface\n",
"eng_interpolated_temp = gis.map('England', zoomlevel=6)\n",
"eng_interpolated_temp.add_layer(oct1st_temp_surface)\n",
"eng_interpolated_temp.legend = True\n",
"eng_interpolated_temp = gis.map('England')\n",
"eng_interpolated_temp.zoom = 6\n",
"eng_interpolated_temp.content.add(oct1st_temp_surface)\n",
"eng_interpolated_temp.legend.enabled = True\n",
"eng_interpolated_temp"
]
},
Expand Down Expand Up @@ -4055,10 +4049,10 @@
"metadata": {
"esriNotebookRuntime": {
"notebookRuntimeName": "ArcGIS Notebook Python 3 Standard",
"notebookRuntimeVersion": "9.0"
"notebookRuntimeVersion": "5.0"
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -4072,9 +4066,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}