|
POST
|
Hi, I am building a custom widget that replicates the main features in the zone lookup instant app with the additional capabilities of selecting target zones using multiple layers or locators to return features based on a spatial intersection, or layer sources to return features using attribute filter. The custom widget is triggered by actions from the Search, Map, and Table widgets based on record selection changes. Everything is updating properly in the Map widget but I am unable to get the query that is applied to the target zones from clearing to return all features in the table widget. I created this function to access the datasource being displayed in the Map and Table to update the query parameters to show all features, but the table widget data does on update. I have tried the using the updateQueryParams() method for the data source and passing the sql query to return all features and passed it the widget id of the table and all other widgets that use the data source but for some reason the table will not refresh or update like the map. Are there some limitations with the updateQueryParams function that will not extend to the table widget? Is there a way to force the table widget to refresh? const handleClearResults = async () => { console.log("handling clear results") let targetDsIds = props.config['zones']['target'] const dsManager = DataSourceManager.getInstance(); const appConfig = getAppStore().getState().appConfig const widgets = appConfig.widgets targetDsIds.map((targetId : string) => { console.log("Target ID: ", targetId) let targetDs: FeatureLayerDataSource = dsManager.getDataSource(targetId) as FeatureLayerDataSource; console.log("Target ds: ", targetDs) let schema = targetDs?.getSchema() let title = targetDs.getLabel() //console.log("schema", ) setNumResults(0) setResults(prev => ({ ...prev, [title]: 0 })) if(schema){ const queryParams: SqlQueryParams = { where: '1=1', //where: `${Object.keys(schema.fields)[0]} IS NOT NULL` } Object.entries(widgets).forEach(([widgetId, widgetConfig]) => { const widgetDataSources = widgetConfig.useDataSources || []; const hasDataSource = widgetDataSources.some((ds) => ds.dataSourceId === targetId); if (hasDataSource) { console.log("updating data source for: ", widgetConfig.label) targetDs.updateQueryParams(queryParams, widgetId); } // console.log("widgetConfig.manifest.name: ", widgetConfig.manifest.name) // if (widgetConfig.manifest.name === "table"){ // let tableId = widgetConfig.id // getAppStore().dispatch({type:""}) // } }); //targetDs.updateQueryParams(queryParams, props.id) //targetDs.clearRecords() targetDs.layer.load().then(() =>{ console.log("layer loaded") }) console.log("updated datasource: ", targetDs) targetDs.clearSelection() console.log("target features cleared: ", targetDs.getSelectedRecords().length) } toggleMapLayers(undefined, true) }) }
... View more
06-26-2024
09:44 AM
|
0
|
5
|
1967
|
|
POST
|
Hi ShengdiZhang, Thanks for looking into my issue. I will send you a message with a link to our sample app. -Britt
... View more
10-14-2022
06:59 AM
|
0
|
0
|
691
|
|
POST
|
I have been attempting to develop a mobile version of an application that utilizes section views. The app load time is extremely long. When switching between different views the app crashes or becomes unresponsive. Each section (9 in total) contains an embedded dashboard that uses url parameters. The embedded dashboard is passed data thats filtered using a list when a record is selected. Switching between selections also seems to make the application crash. I have also tested a version of the application using Experience Builder's map widget and filters instead of a dashboard and the issue was the same. Has anyone else experienced this type of behavior?
... View more
09-30-2022
01:34 PM
|
0
|
2
|
746
|
|
POST
|
Hi, I'm trying to modify the web-map-swap custom widget created by @GavinR : GitHub - gavinr/web-map-swap-experience-builder: Sample widget experimenting how to swap the webmap dynamically in a single Experience Builder map widget to accept a web map datasource rather than an item portal id. I've updated the settings for the widget to accept mutiple web maps and datasources and I would like the user to be able to choose those datasources from a drop down to update the map widget. /** @jsx jsx */
import { AllWidgetProps, React, jsx } from 'jimu-core'
import { IMConfig } from '../config'
import defaultMessages from './translations/default'
import { MapViewManager, JimuMapViewComponent, JimuMapView } from 'jimu-arcgis'
import WebMap from 'esri/WebMap'
import MapView from "esri/views/MapView";
import { WidgetPlaceholder } from 'jimu-ui'
import { _SettingRow } from 'jimu-ui/advanced/lib/setting-components/components/layout/row'
const starIcon = require('jimu-ui/lib/icons/star.svg')
const { useState } = React
export default function Widget (props: AllWidgetProps<IMConfig>) {
const [jimuMapView, setJimuMapView] = useState<JimuMapView>()
const mvManager: MapViewManager = MapViewManager.getInstance();
const selectChangeHandler = (evt) => {
if (jimuMapView) {
if (evt.target.value !== '') {
console.log("This is the starting jimMapView")
console.log(jimuMapView)
console.log("This is the starting jimMapView")
// const options: __esri.MapViewProperties = {
// map: new WebMap(),
// };
// jimuMapView.view.map = mvManager.createJimuMapView({
// mapWidgetId: props.useMapWidgetIds?.[0],
// view: new MapView(options),
// dataSourceId: evt.target.value,
// isActive: true
// }).then(jv => {
// //setJimuMapView(jv)
// return jv.view.map
// })
console.log(jimuMapView)
//try set map view
jimuMapView.view.map = new WebMap({
// portalItem: {
// // autocasts as new PortalItem()
// id: evt.target.value
// }
})
} else {
// set to default (todo)
}
}
}
let content
if (props.useDataSources &&
props.useDataSources.length > 0) {
content = <p className="shadow-lg m-3 p-3 bg-white rounded">
<label style={{ maxWidth: '100%' }}>
{defaultMessages.webMap}:<br />
<select
onChange={(evt) => {
selectChangeHandler(evt)
}}
style={{ maxWidth: '100%' }}
>
{/* <option value=""></option>
{props.config.webMapIds.map((webMapId) => {
return <option value={webMapId}>{webMapId}</option> */}
<option selected disabled>
Choose one
</option>
{props.useDataSources.map((datasource, index) => {
return <option value={datasource.dataSourceId}>{datasource.dataSourceId}</option>
})}
</select>
</label>
<JimuMapViewComponent
useMapWidgetId={props.useMapWidgetIds?.[0]}
onActiveViewChange={(jmv: JimuMapView) => {
setJimuMapView(jmv)
}}
/>
</p>
} else {
content = <WidgetPlaceholder icon={starIcon} widgetId={props.id} message={defaultMessages.placeholderMessage} />
}
return (
<div
className="widget-view-layers-toggle jimu-widget"
style={{ overflow: 'auto' }}
>
{content}
</div>
)
}
... View more
07-26-2022
08:50 AM
|
1
|
0
|
1413
|
|
POST
|
Yea, totally agree. If our data was in our enterprise I would definitely access monitor or just pull the service request details from our server. But I like your other idea about conflating logins from our group members with upticks in views for the item layers. I might just go with that to get close to addressing the original request. Thanks Josh!
... View more
04-02-2021
06:55 AM
|
1
|
1
|
5809
|
|
POST
|
Hi Josh, Thank you for your response. The need to track user specific stats comes from a request to monitor usage of sensitive data (not pii but still sensitive) we serve out to a group in AGO. So I have an idea of who could be using the data because its only shared with members of 1 group, but there was a request to have an even finer grained log of usage beyond just views. The data is all feature layers so our goal was to see 'who' is accessing 'what' data. I figured this was not feasible but I want to confirm.
... View more
04-02-2021
06:10 AM
|
0
|
3
|
5812
|
|
POST
|
Hi, Is there a way to track what items users are viewing in my ArcGIS Online Organization? I have downloaded the activity log and I can see which users are performing actions like updating, editing, etc, but I am interesting and tracking who is viewing/accessing an item.
... View more
03-30-2021
01:16 PM
|
1
|
8
|
5887
|
|
POST
|
Hi Simon, thanks for your response. I ended up doing the get_data() option for some of the older stormaps and that seemed to do the trick. In addition to that I also had success using the get_data() method to find the dependencies of my apps and clone those first then clone the actual app and pass the item_id_map to the clone items method. That seemed to work.
... View more
01-19-2021
06:04 AM
|
1
|
1
|
2617
|
|
POST
|
Hey Calvin, Thanks for responding again. I was actually following this guide:https://developers.arcgis.com/python/guide/cloning-content/#the-cloning-process because I need to make sure that the cloned applications were consuming the right web app. I took a look at the relationship process, but it looks like that more for establishing relationships between services and web map or web applications.
... View more
01-14-2021
07:46 AM
|
0
|
3
|
2668
|
|
POST
|
HI Calvin, I used the item.copy method to make a copy of webmaps. I wanted to keep the references to services so I could update the service urls later. That worked fine. I'm in the process now of cloning web mapping applications and dashboards right now using the ContentManager.clone_items method because I want to now clone those apps and pass the new web map ids that I copied to the cloned app. I'm running into a problem though with the item mapping. I have tried several times to pass the item_mapping parameter the dictionary of source (old web map ids) and target (new web map ids) but the result is a clone of the app with the old web maps: here is my code below. You can see that the ids for the web maps persist rather than updating to the new ids. This is a StoryMap app item_map = {'2fa027839c63473094f538d029a17f17': '4301017941324b35b157f54114877481', 'dd161c2a532a491987426ec3912840d8': '7ff1b8c0c2a04b5992893bda146f6ef2'} copied_embedded_app = content_manager.clone_items([embedded_app], folder_name, item_mapping = item_map) print_app_inventory(copied_embedded_app[0], gis_source)
... View more
01-13-2021
09:12 AM
|
0
|
5
|
2692
|
|
POST
|
Hi there, I'm in the process of copying web maps from one user to another. I chose to copy the item rather than clone_items after getting an error stating that a feature service the web map was consuming could not be cloned. Copying worked just fine and the web map references the source URLS. My question is, is the copied item completely isolated from the source item? I want to move on to make some updates a few of the service urls for some of the operational layers but I want to confirm that this will not effect the source item. Thanks!
... View more
01-11-2021
10:12 AM
|
0
|
7
|
2718
|
|
POST
|
Hello, After reviewing the output of my od cost matrix I noticed that for some od pairs the public transit time and walk time were the same for places really far from a transit stop. Does the mean that walk is the mode for the journey since the public transit time includes the walk time?
... View more
12-15-2020
06:34 PM
|
0
|
1
|
606
|
|
POST
|
Hi, I'm trying to configure the Nearby app to test on my local server and eventually my development web server but when I update the portal url, appid, and oauthappid I get an error : (index):236 Uncaught TypeError: Cannot read property 'trim' of undefined at Object.x [as normalize] ((index):236) at d.e._sanitizeUrl (IdentityManager.js:36) at d.e.findOAuthInfo (IdentityManager.js:13) at IdentityManager.js:10 at Array.filter (<anonymous>) at d.e.registerOAuthInfos (IdentityManager.js:10) at ApplicationBase._registerOauthInfos (ApplicationBase.ts:647) at ApplicationBase.load (ApplicationBase.ts:202) at init.ts:39 at wa ((index):19) Any thoughts?
... View more
12-09-2020
11:02 AM
|
0
|
3
|
2066
|
|
POST
|
Hi Mehid, Thank you for responding to my post. I actually copied the wrong blog I meant to copy the blog you just suggested. I came across that blog post, but that seems to only apply to hosted feature layers. I'm trying to update symbology of feature layers produced from bulk publishing form a registered datastore.
... View more
10-08-2020
05:50 AM
|
0
|
0
|
912
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-12-2025 11:58 AM | |
| 1 | 04-02-2021 06:55 AM | |
| 2 | 04-22-2025 11:53 AM | |
| 1 | 06-27-2024 06:55 AM | |
| 1 | 03-30-2021 01:16 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-17-2025
12:49 PM
|