DOC
|
Hi @JeffreyThompson2 , Thanks for the app I was wondering if there is a way to enable the widget to respect the incoming url parameters? I can pass the attribute and value that selects the feature in the map but the widget will not populate unless the user clicks map. Thank you Heath
... View more
04-30-2025
07:42 AM
|
0
|
0
|
1395
|
POST
|
Hi all, I'm trying to create a URL parameter in Experience Builder (ExB) while working in ArcGIS Enterprise 11.3. I've followed the documentation and successfully implemented a "data_s=where:" statement in ArcGIS Online, but I'm having trouble replicating that success in Enterprise. 📄 Reference documentation: Experience Builder URL Parameters (ArcGIS 11.3) 🔧 Here's the example I'm working from: #ESRI EXAMPLE
https://experience.arcgis.com/experience/<AppId>/#data_s=where:widget_1-dataSource_1-1871234a785-layer-2:a>1
#TESTING URL
https://<organization portal url>/apps/experiencebuilder/experience/?id=<experienceID>#data_s=where%3A<dataSource value>%3A<attributeField>%3D<attributeValue> So far, I've been successful using OBJECTID as the attribute field, but I can’t seem to get it to work with other attribute fields. I’ve double-checked field names, data types, and syntax, but no luck so far. Has anyone encountered this in Enterprise 11.3 or have any tips on what might be causing the issue? Any help would be greatly appreciated! Cheers, Heath
... View more
04-23-2025
01:41 PM
|
2
|
4
|
932
|
POST
|
Greetings All, I’ve been conducting some testing on passing two data sources through URL parameters in Experience Builder, and I wanted to share my findings. Data: hosted feature service in arcgis online with a related table. Experience builder: ArcGIS Online (current online release) While reviewing the documentation, pay close attention to the notes—especially where ESRI states "Experience Builder previously used the ?data_id parameter to select data. That parameter is currently still supported but will soon be deprecated." The data_s parameter is now the recommended approach. Link to ArcGIS Experience Builder URL Parameters Using ESRI’s example as a starting point: https://experience.arcgis.com/experience/<AppId>/#data_s=where:widget_1-dataSource_1-1871234a785-layer-2:a>1 II was able to construct a custom URL of my own: https://experience.arcgis.com/experience/<appid>#data_s=where:<dataSource ID>:<field name>=<attribute>,where:<dataSource ID #2>:<field name>=<attribute> Here is a live site example: Link to Property Search experience Parcel 31-2-0273-50 In this case, the URL first references the feature class (dataSource_8-0), then the related table (dataSource_8-2), but switching the data source order still yields the same result. Tip: If you're filtering your data, be sure to check the encoding guidelines in the documentation. My experience uses the "Selected Data" content type, but to avoid any issues, I recommend building the encoding directly into your URL for consistency. Cheers, Heath
... View more
04-10-2025
09:47 AM
|
0
|
0
|
852
|
POST
|
Hi @MeleKoneya1 This is me I had to create a new account. Cool map. My name is Heath Anderson and I work for the City of Appleton in Appleton, WI. I use some prompt engineering and AI to help generate the code for that I sent you. Thank You Heath
... View more
03-21-2025
11:45 PM
|
1
|
0
|
968
|
POST
|
Hi @MeleKoneya, The real bulk of of the lines takes place at line 77. When the Geodesic are created. Everything else I preparing to set the start and end locations of the flight path. lines 77-109 is the mathematical expression to create the circle. Then print the start and end values (line 78) num_points=100 it will create 100 vertices along the line. You can raise or lower this to smooth it out but I find 100 to be antiquate. lines 138-146 set the height of the Geodesic line by changes the divisional value lines 148-164 creates an array to hold the new z-values lines 166-175 updates the z-vales of the line work to push the geodesic line work to 3D I hope this helps. If what you are working in is publicly available I would love to see what it looks like. Reply with your site or an image if you'd rather. Let me know if you need anything else. Cheer, Heath Here is the example of my working site and script. Just for fun https://gis.appleton.org/grinch.html import arcpy, random, webbrowser, math, datetime
import numpy as np
import math
import matplotlib.pyplot as plt
from IPython.display import display
from xml.sax.saxutils import escape
from arcpy import GetPortalInfo, GetActivePortalURL
#--- AGOL Login Info ---
agol_org = '[PORTAL AND AGOL URL]'
agol_user = '[USERNAME]' # See line 172 and make that match
agol_pass = '[PASSWORD]'
gis = arcpy.SignInToPortal(agol_org, agol_user, agol_pass)
print(arcpy.GetPortalInfo(portal_URL=arcpy.GetActivePortalURL()))
# Checks to see if the user is signed into Portal
##def portal_sign_in_check() -> None:
## portal_info: dict = GetPortalInfo(portal_URL = GetActivePortalURL())
## if portal_info['role'] == '':
## print('User is not signed-in to portal ' + str(portal_info))
## else:
## print('User is signed-in to portal ' + str(portal_info))
##
##print(portal_sign_in_check())
# get Grinch current location
grinchCurXY = "https://services1.arcgis.com/KowZ0VFM04w7hjgW/arcgis/rest/services/Grinch_Location/FeatureServer/0"
for loc in arcpy.da.SearchCursor(grinchCurXY, ["SHAPE@XY", "CITY_NAME", "POP", "CNTRY_NAME"]):
grXY = loc[0]
grCity = loc[1]
grPop = loc[2]
grCnt = loc[3]
print ("PointXY: {0}, City: {1}, Population: {2}, Country: {3}".format (loc[0], loc[1], loc[2], loc[3]))
# Update grinch location as historical
griHist = "https://services1.arcgis.com/KowZ0VFM04w7hjgW/arcgis/rest/services/grinchHistoricLocs/FeatureServer/0"
values = [(grXY, grCity, grPop, grCnt)]
griCur = arcpy.da.InsertCursor(griHist, ["SHAPE@XY", "CITY_NAME", "POP", "CNTRY_NAME"])
for loc in values:
griCur.insertRow(loc)
del griCur
# Updates historical points with xy flight data
arcpy.management.CalculateField(
in_table=griHist,
field="START_X",
expression="-123.105556",
expression_type="SQL",
code_block="",
field_type="TEXT",
enforce_domains="NO_ENFORCE_DOMAINS"
)
arcpy.management.CalculateField(
in_table=griHist,
field="START_Y",
expression="49.714444",
expression_type="SQL",
code_block="",
field_type="TEXT",
enforce_domains="NO_ENFORCE_DOMAINS"
)
arcpy.management.CalculateGeometryAttributes(
in_features=griHist,
geometry_property="POINT_X POINT_X;POINT_Y POINT_Y",
length_unit="",
area_unit="",
coordinate_system='GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]',
coordinate_format="SAME_AS_INPUT"
)
# Create a function to generate points along the geodesic
def great_circle_points(start, end, num_points=100):
lat1, lon1 = np.radians(start[1]), np.radians(start[0])
lat2, lon2 = np.radians(end[1]), np.radians(end[0])
d = 2 * np.arcsin(np.sqrt(np.sin((lat2 - lat1) / 2) ** 2 +
np.cos(lat1) * np.cos(lat2) * np.sin((lon2 - lon1) / 2) ** 2))
lats = np.linspace(lat1, lat2, num_points)
lons = np.linspace(lon1, lon2, num_points)
arc_points = []
for i in range(num_points + 1):
a = math.sin((1 - i / num_points) * d) / math.sin(d)
b = math.sin((i / num_points) * d) / math.sin(d)
x = a * np.cos(lat1) * np.cos(lon1) + b * np.cos(lat2) * np.cos(lon2)
y = a * np.cos(lat1) * np.sin(lon1) + b * np.cos(lat2) * np.sin(lon2)
z = a * np.sin(lat1) + b * np.sin(lat2)
lat = np.arctan2(z, np.sqrt(x * x + y * y))
lon = np.arctan2(y, x)
arc_points.append((np.degrees(lon), np.degrees(lat)))
return arc_points
#set geodesic startup
for loc in arcpy.da.SearchCursor(griHist, ["SHAPE@XY", "CITY_NAME", "POP", "CNTRY_NAME", "START_X", "START_Y", "POINT_X", "POINT_Y"]):
start_point = (loc[4], loc[5])
end_point = (loc[6], loc[7])
print ("Start point: {0}, End point: {1}".format (start_point, end_point))
# calculate geodesic
# Generate geodesic points
arc_points = great_circle_points(start_point, end_point)
# Convert to 3D with Z values
line_length = arcpy.PointGeometry(arcpy.Point(*start_point)).distanceTo(arcpy.PointGeometry(arcpy.Point(*end_point)))
z_values = line_length * np.sin(np.linspace(0, math.pi, len(arc_points)))
arc_points_3d = [(lon, lat, z) for (lon, lat), z in zip(arc_points, z_values)]
# Use arcpy to create a polyline and save it to a feature class
arcpy.env.workspace = "[WORK SPACE ENVIRONMENT]"
arcpy.env.overwriteOutput = True
sr = arcpy.SpatialReference(4326) # WGS84
# Create the polyline geometry
polyline = arcpy.Polyline(arcpy.Array([arcpy.Point(*coords) for coords in arc_points_3d]), sr)
# Save the polyline to a feature class
arcpy.management.CreateFeatureclass(arcpy.env.workspace, "geodesicArc3D", "POLYLINE", spatial_reference=sr, has_z="ENABLED")
with arcpy.da.InsertCursor("geodesicArc3D", ["SHAPE@"]) as cursor:
cursor.insertRow([polyline])
#TEMPFlights = "holding"
TEMPFlights = "geodesicArc3D"
# Calculate the geodesic distance (length of the line)
with arcpy.da.SearchCursor(TEMPFlights, ["SHAPE@"]) as cursor:
for row in cursor:
line = row[0]
start_point = line.firstPoint
end_point = line.lastPoint
line_length = line.getLength("GEODESIC")/5
del cursor
# Function to adjust Z-values in a semi-circle arc
def adjust_z_values_semi_circle(line, max_z):
num_points = len(line.getPart(0))
angles = np.linspace(0, np.pi, num_points)
z_values = max_z * np.sin(angles)
# Print the Z-values
print("Z-values for each vertex:")
for i, z in enumerate(z_values):
print(f"Vertex {i + 1}: Z = {z}")
# Create new vertices with updated Z-values
new_vertices = []
for i, point in enumerate(line.getPart(0)):
new_vertices.append(arcpy.Point(point.X, point.Y, z_values[i]))
return arcpy.Array(new_vertices), z_values
# Extract all vertices and update their Z-values
with arcpy.da.UpdateCursor(TEMPFlights, ["SHAPE@"]) as cursor:
for row in cursor:
line = row[0]
new_vertices, z_values = adjust_z_values_semi_circle(line, line_length)
new_line = arcpy.Polyline(arcpy.Array([new_vertices]), line.spatialReference, has_z=True)
row[0] = new_line
cursor.updateRow(row)
del cursor
print("Z-values have been updated successfully.")
# Plot the Z-values
'''
plt.plot(z_values)
plt.title("Z-values Along the Arc (Semi-Circle Shape)")
plt.xlabel("Vertex Index")
plt.ylabel("Z Value (meters)")
plt.grid(True)
plt.show()
'''
# Grinch Flight lines
grinLine = "https://services1.arcgis.com/KowZ0VFM04w7hjgW/arcgis/rest/services/flightpath/FeatureServer/0"
arcpy.management.Append(
inputs="geodesicArc3D",
target=grinLine,
schema_type="NO_TEST",
field_mapping='POINT_X "POINT_X" true true false 0 Double 0 0,First,#;POINT_Y "POINT_Y" true true false 0 Double 0 0,First,#;START_X "START_X" true true false 0 Double 0 0,First,#;START_Y "START_Y" true true false 0 Double 0 0,First,#',
subtype="",
expression="",
match_fields=None,
update_geometry="NOT_UPDATE_GEOMETRY"
)
print ("done")
... View more
12-10-2024
09:51 AM
|
1
|
0
|
1276
|
POST
|
Hi @MeleKoneya, I do believe I have a solution for you. Please take a look at the image and let me know if this is what you would like to recreate and I can share my solution? Cheers, Heath
... View more
12-10-2024
06:08 AM
|
0
|
0
|
2066
|
POST
|
Hi NickShannon, I am revisiting this problem I have creating an arc. Could you elaborate on what X and D stand for and how they are calculated? If possible could you provide and example? Best Heath
... View more
11-08-2024
01:43 PM
|
0
|
0
|
2202
|
POST
|
Is it possible to open a section view after record selection change? It appeas that one can open a sidebar but not navigate to section view. @Jianxia if this functionality is currently not offered, would it be possible to incorperate in a future build?
... View more
10-23-2024
01:15 PM
|
0
|
3
|
543
|
POST
|
Same issue using D2M 2024.1.0. Anyone found a resolution to this?
... View more
06-26-2024
01:40 PM
|
0
|
0
|
507
|
POST
|
What I've been doing is running all the Surveys and reports from a built-in account with admin credentials.
... View more
06-06-2024
02:13 PM
|
0
|
0
|
2597
|
BLOG
|
@zainabzia What version of Portal are you running? Would using Web-tier authentication be an option for you? This method is available from 10.8 - current release (11.3) https://enterprise.arcgis.com/en/portal/11.3/administer/windows/about-configuring-portal-authentication.htm#ESRI_SECTION1_66C3475137F544719F1CA3129B62D939
... View more
06-04-2024
06:23 AM
|
0
|
0
|
1827
|
POST
|
In an Enterprise database what is the easiest way to change the field length for the editor tracking fields. It was initially set at 25 which is way to short to store SSO username. I want to change it to 255 but am unsure of the best, most efficent way of going about this. Cheers, Heath
... View more
05-01-2024
12:24 PM
|
0
|
1
|
835
|
POST
|
Hi Andrew, Thank you for the input. In you Nutanix setup are. Are you using Nutanix as a hybrid environment itself, i.e. Nutanix on-premises and Nutanix cloud env? Or have you forgone the Nutanix cloud and opted for ArcGIS Online cloud? Sorry last question. What kind of ROI or cost savings have you seen moving to Nutanix? Cheers, Heath
... View more
04-22-2024
06:39 AM
|
0
|
0
|
1265
|
Title | Kudos | Posted |
---|---|---|
2 | 04-23-2025 01:41 PM | |
1 | 03-21-2025 11:45 PM | |
1 | 12-10-2024 09:51 AM | |
1 | 01-24-2024 06:56 AM | |
1 | 07-19-2023 03:21 PM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|