POST
|
Hi Noah, Thanks for reaching out. Here are the response to your questions and I have one additional question regarding something I just experienced: 1) Do you see your custom print templates being returned from this property? https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html... I don't see my custom templates returned from the default templates property. And just as some background I am using custom map layout templates and a report template in my print service. 2) What is the purpose of the custom widget? Like is this part of an app, or how would it be used and in what sort of workflow? The purpose of the custom widget is to allow a user to choose to print a map and/or a report that includes a map and details about a selected feature or features in the map. The custom print widget is used in an javascript application. I initially I was utilizing the print component, but I realized that there was no way to allow the user the select a feature in my application and then have that selection be applied as a filter to source layer for my report. I will send you a direct message with a link to an example report and a link to my test application. After chatting with another user in Esri community they recommended using the useEsriInterceptor function with the print method from the print view model to intercept the webmapjson before the print is executed to apply a definition query to the source layer. 3) Are you using build tools or frameworks? I am using react 4) If this is a new project, have you considered components? This is the future of widgets for the ArcGIS Maps SDK for JavaScript. I started with the print component see my answer to question 2. New question: Everything is setup and working fine with the exception of how some of the data is being sent to the print service. For some reason a feature layer that is created within my app using graphics as the feature layer source is being sent to the print service as imageData and then not being included in the map legend. I don't understand why this is happening and any help would be appreciated.
... View more
05-12-2025
11:58 AM
|
1
|
0
|
237
|
POST
|
Hello, I developing a custom print widget using the Print View Model. My print service uses custom layouts and reports that I want reflected in the print area that is displayed in the map. Currently, the print area only displays the default 'letter-ansi-a-landscape' layout and I am not sure what property to update in the Print View Model to modify the print area. Any help would be appreciated. thanks, Britt
... View more
04-28-2025
01:37 PM
|
0
|
2
|
355
|
POST
|
Joel, I added this to my print component in my app and it did the trick. Thanks again! esriConfig.request.interceptors.push({ urls: config.print_service_url, before: (params) => { const query = params.requestOptions?.query; console.log("request query: ", query) if (query) { const webMapParam = query.Web_Map_as_JSON if (webMapParam) { const webMap = JSON.parse(webMapParam); // Modify the operational layers by adding a //definiton query to the parcel layer const operationalLayers = webMap.operationalLayers webMap.operationalLayers = operationalLayers.map((layer) => { if(layer.id === sourceId){ console.log("applying defintion expression to: ", layer.id, expression) layer.layerDefinition.definitionExpression = expression } return layer }) params.requestOptions.query.Web_Map_as_JSON = JSON.stringify(webMap); } } }, after: (response) => { console.log("Modified print response", response); return response; } });
... View more
04-22-2025
11:53 AM
|
2
|
0
|
522
|
POST
|
Joel, thank you for the direction and helpful links. I'll give it a try. -Britt
... View more
04-22-2025
10:13 AM
|
0
|
0
|
530
|
POST
|
Hi, I am trying to print using a custom report template built using ArcGIS Pro. The goal of the report template is to display a map of a selected parcel and attributes describing the property. The datasource is a large parcel dataset that is consumed in a custom javascript application that uses the print component. I followed directions to create the report template and publish a new print service with the template as a report option. In my app I am able to update the reportOptions "sourceId" to point to my parcel layer and then pass the updates to the print component as a printTemplate. My Question: Is there anyway to pass a definition query or a filter as a report option to only display a selected feature in my source layer instead of everything in view? Or do I have to apply the definition query directly my source layer? thanks, Britt @Noah-Sager I watched your presentation from this year's Dev summit. Appreciate all the great info. It really helped to get me started. Any chance this question is in your wheelhouse?
... View more
04-21-2025
01:08 PM
|
0
|
3
|
599
|
POST
|
Hi Jeffrey, Thanks again for your help and the sharing suggestion. I'll definitely share to the group once my team finishes up all the testing. best, Britt
... View more
07-01-2024
07:23 AM
|
0
|
0
|
1515
|
POST
|
Update, I was using the setRecords instead of setSourceRecords method. Problem solved. Thank you!
... View more
06-27-2024
06:55 AM
|
1
|
2
|
1584
|
POST
|
Thanks for suggestion @JeffreyThompson2 ! I was able to create the client side output and access it as a datasource in my table widget using the documentation you provided. However I did get stuck. After accessing the widgets output as a datasource the table widget registers the datasource schema and fields, but the table is not populating the records. I'm running into an issue I've seen others discuss in this thread: https://community.esri.com/t5/arcgis-experience-builder-questions/set-up-a-widget-output-data-source-without/td-p/1288302 This was from a year ago, but updating the records in the output datasource using the setRecords method doesn't seem to work, so I was going to explore the option of updating records using the updateSourceByFeatures() described in the thread. Have you had any of this issues?
... View more
06-26-2024
03:33 PM
|
0
|
0
|
1607
|
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
|
1679
|
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
|
610
|
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
|
665
|
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
|
1304
|
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
|
5156
|
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
|
5159
|
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
|
7
|
5234
|
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 |
08-04-2025
08:30 AM
|