|
POST
|
I need to modify the popup to include a new element (could be a styled HTML table row) between the existing pagination action bar and the Title (see mockup with red/blue banner below). Can I modify the default popup's HTML container to include a new <div> element to display the banner incorporating JS and CSS? I am working in Experience Builder Developer v1.13 which incorporates extensive Calcite integration making access to custom styling of specific elements more challenging. Thanks!
... View more
01-15-2024
02:04 PM
|
1
|
0
|
765
|
|
POST
|
ExB Dev 1.13. Here is the widget.tsx code for a custom widget that restricts the map view /**
Licensing
Copyright 2022 Esri
Modified from 'map-view' sample code widget (JR, YH)
Map view widget that will restrict the map view to the minZoomScale specified and restrict panning to the original extent of the map
*/
import { React, jimuHistory, DataSourceComponent, type AllWidgetProps, type IMState, type IMUrlParameters } from 'jimu-core'
import MapView from 'esri/views/MapView'
import type WebMap from 'esri/WebMap'
import Extent from 'esri/geometry/Extent'
import Point from "@arcgis/core/geometry/Point.js";
import { MapViewManager, type WebMapDataSource } from 'jimu-arcgis'
// Bring the 'Home' and 'Scalebar' properties into the map
import Home from '@arcgis/core/widgets/Home';
import ScaleBar from '@arcgis/core/widgets/ScaleBar';
import Popup from "@arcgis/core/widgets/Popup.js";
// Alert component state
interface State {
isValidCenter: boolean;
}
// Not sure what the following does from the sample 'map-view' widget from which this code was modified queries the URL REST parameters for a mapview extent
interface ExtraProps {
queryObject: IMUrlParameters
}
// Set a minimum zoom scale to prevent user from zooming out beyond the valid extent
const minZoomScale = 6
export default class Widget extends React.PureComponent<AllWidgetProps<unknown> & ExtraProps, State> {
mapContainer = React.createRef<HTMLDivElement>()
mapView: MapView
webMap: WebMap
extentWatch: __esri.WatchHandle
mvManager: MapViewManager = MapViewManager.getInstance();
constructor(props) {
super(props);
this.state = {
isValidCenter: true, // Initialize state with default value
};
}
static mapExtraStateProps = (state: IMState): ExtraProps => {
return {
queryObject: state.queryObject
}
}
onDsCreated = (webmapDs: WebMapDataSource) => {
console.log("Webmap loaded")
if (!webmapDs) {
console.log("Webmap not initialized")
return
}
if (!this.mvManager.getJimuMapViewById(this.props.id)) {
const options: __esri.MapViewProperties = {
map: webmapDs.map,
container: this.mapContainer.current,
constraints:{
minZoom: minZoomScale,
snapToZoom: false
}
}
console.log("minZoom set:", minZoomScale)
this.mvManager.createJimuMapView({
mapWidgetId: this.props.id,
view: new MapView(options),
dataSourceId: webmapDs.id,
isActive: true,
mapViewManager: this.mvManager
}).then(jimuMapView => {
// Create and add the Home widget to the map view
const homeWidget = new Home({ view: jimuMapView.view });
jimuMapView.view.ui.add(homeWidget, 'top-left');
// Need to explictly cast the view to --esri.MapViewProperties
// to ensure type compatibility with the scalebar
const mapView = jimuMapView.view as __esri.MapViewProperties;
// Create and add the Scalebar widget to the map view
const scaleBarWidget = new ScaleBar({ view: mapView });
jimuMapView.view.ui.add(scaleBarWidget,'bottom-left')
//console.log(mapView.extent)
const view = jimuMapView.view as __esri.MapView;
const extentLimit = view.extent.clone();
view.constraints.geometry = extentLimit
})
}
}
mapNode = <div className="widget-map" style={{ width: '100%', height: '100%' }} ref={this.mapContainer}></div>
render () {
if (!this.props.useDataSources || this.props.useDataSources.length === 0) {
return 'Select a webmap in the settings panel'
}
return <DataSourceComponent useDataSource={this.props.useDataSources[0]} onDataSourceCreated={this.onDsCreated}>
{this.mapNode}
</DataSourceComponent>
}
}
... View more
12-14-2023
09:05 AM
|
0
|
0
|
1700
|
|
POST
|
Note, in ExB Dev v1.13 there is extensive application of the Calcite Design Framework that encapsulates a lot of the UI elements which improves the integration but also makes it more challenging to access specific elements. e.g. the above solution doesn't work.
... View more
12-14-2023
08:36 AM
|
0
|
2
|
2492
|
|
POST
|
There are two approaches: In ArcGIS Pro, publish the web map setting a Map frame constraint In ExB Dev there is a custom 'map-view' widget in the Sample Code repository. With the ArcGIS API for JavaScript you can modify the map view property (code example) to the intial default extent of the web map and set a minZoomScale property. This video provides a great demo: https://www.youtube.com/watch?v=aVjtFKkF9q8
... View more
11-23-2023
09:36 AM
|
0
|
1
|
1758
|
|
POST
|
Hi Janna, I think you need to first identify the ArcGIS project and the active map, then add the layer in order to view the output. aprx = arcpy.mp.ArcGISProject("current")
mp = aprx.listMaps()[0]
mp.addLayer(output_raster_layer)
... View more
11-17-2023
11:20 AM
|
0
|
1
|
1254
|
|
POST
|
I understand we can restrict a web map's navigation extent as a configurable option in ArcGIS Online, but there aren't any such options in Enterprise 10.9.1 with which I'm working. Does anyone have any direction on how I might achieve restricting the pan and zoom options within my Experience Builder Developer (v1.13) app to the area of interest? Many thanks in advance!
... View more
11-17-2023
08:28 AM
|
1
|
2
|
1871
|
|
POST
|
Thank you so much, @JeffreyThompson2! Going the route of adding the 'style.scss' was very straightforward! I will leave the css-in-js approach to a rainy day. Thank you so much!
... View more
10-23-2023
02:25 PM
|
0
|
0
|
2658
|
|
POST
|
Thanks for your quick response @JeffreyThompson2! But I'm at a loss as to how to first find the element class I want to apply the change to so I can properly identify it in the custom 'style.ts'. I am new to ExB Dev and don't understand the project structure in any detail. Can you provide a some guidance or point me to documentation that could enlighten me? In the meantime I'll dive into the ExB Developer documentation. PS I just heard back from technical support and in addition to the guidance I've already linked above they shared the following: You can follow the steps in the guide for building a custom theme for Experience Builder. Also, you can see the full theme variable JSON from the demo theme, for changing theme variables of existing themes. Or, you can create a new theme. You can also inspect the sample theme. Thank you! I'll report back once I've solved this!
... View more
10-20-2023
02:37 PM
|
0
|
2
|
2744
|
|
POST
|
When a user clicks a spot with overlapping features, the pop-up panel that is triggered displays on the right-corner a 'feature-menu-button' and R/L arrows, indicating how many features overlap and prompting the user to click through to view their details. I am using Experience Builder Developer 1.12. I want to change the background-color of the 'esri-popup__feature-menu-button' to cyan to draw the user's eye to ensure overlapping features aren't overlooked. I think I can do this by creating a custom theme and adding a style.ts as described in this Sample Code, but I don't know where to find and identify the elements. Where do I begin? Thanks so much in advance! The demo screenshot was made to the HTML page by adding
... View more
10-20-2023
01:29 PM
|
0
|
7
|
2803
|
|
POST
|
Hi Henry, this is a very late response and you've likely solved your issue if not when you posted a couple years ago, then with subsequent versions of EB. But with the 10.9.1 version you can create a hyperlink 'Add link' via the 'Page' view, then 'Set link' while selecting the 'New window' radio button option.
... View more
03-08-2023
02:45 PM
|
2
|
0
|
1763
|
|
IDEA
|
When creating a custom service in ArcGIS Pro the print service does not honour the checked option in the PAGX file for the Legend display to 'Only show features visible in the map extent'. As @FC_Basson notes above, "This is not a function of the API, but the Web Map Print Service from your server. The print templates need to be set up to filter the symbology for the visible area. This works with print services published from ArcGIS Pro and with the default Utilities Print Services from 10.7 and up." How can the functionality be implemented for a custom print service? I am using ArcGIS Pro 2.7.1 and ArcGIS Enterprise 10.8.1 Thanks in advance!
... View more
04-04-2022
01:55 PM
|
0
|
0
|
4195
|
|
POST
|
I received confirmation from ESRI support that this functionality is not available.
... View more
02-23-2022
04:38 PM
|
0
|
0
|
889
|
|
POST
|
I am using Enterprise Portal groups to collate data layers for curated filters used by the 'Add Data' widget in a web app. Currently, there is no apparent order to the list of layer items. Is it possible to specify the default order in which the layers appear so that similar items can be grouped together in sequence? I understand the widget interface allows the user to sort the items by 'title', 'date', etc, but I would like to set a default order. I believe we can categorize and prioritize content at the organizational level, but is this also possible at the group level?
... View more
02-16-2022
03:41 PM
|
0
|
1
|
949
|
|
POST
|
I too wish there was a way to prevent the truncation of Bookmark names by wrapping text. I understand how text wrapping could disrupt the grid arrangement of bookmarks in 'card' view, but list view should be able to accommodate this. The custom 'Enhanced Bookmark' enables this, but doesn't include an option to 'Save visible layers' along with the extents. I was able to get a compromise solution by expanding the Bookmark css file ('server/apps/2/widgets/Bookmark/css/style.css') with the following code: /*modify width of bookmark panel to avoid bookmark name truncation */ #widgets_Bookmark_Widget_31_panel { width: 475px !important; }
... View more
01-27-2022
07:02 AM
|
0
|
0
|
739
|
|
IDEA
|
I agree the truncation of Bookmark titles is not user-friendly. This occurs in the list view as well with long titles.
... View more
01-26-2022
02:31 PM
|
0
|
0
|
277
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-17-2023 08:28 AM | |
| 1 | 04-04-2025 06:49 PM | |
| 1 | 12-05-2024 11:01 AM | |
| 2 | 01-17-2024 10:20 AM | |
| 1 | 09-09-2021 09:10 AM |
| Online Status |
Offline
|
| Date Last Visited |
09-23-2025
04:09 PM
|