POST
|
I figured it out. The easier way to programmatically close the popup and clear the selection/highlight from the map is to close the featuresWidget and emit a click event on the map. Simple. featuresWidget.close();
await new Promise(resolve => setTimeout(resolve, 50));
// Simulate click at center
view.emit("click", {
mapPoint: view.center,
x: view.width / 2,
y: view.height / 2,
stopPropagation: () => {}
});
... View more
yesterday
|
0
|
0
|
11
|
POST
|
You misunderstood me. I want to simulate clicking the close button of the features widget when any of the widget located at the action bar is clicked. Nothing is broken. And no, we don't use div for every widget. Each widget in the action bar (Legend, basemaps, layer list...) uses its own panel in the features widget. There are so many examples of it in the Calcite site. I want remove the selection of the feature as I mentioned in the previous posting prior selecting another widget from the action bar.
... View more
yesterday
|
0
|
0
|
20
|
POST
|
Thanks, I’ve already tried that. Here’s the issue: I have a feature layer, and when a user clicks on a feature, the popup appears inside the Features widget on the left panel. If the user then clicks a tool on the left action bar—like the Basemap widget—it opens within the same Features widget panel. After that, if the user clicks on another feature, no popup appears, and the Features widget stays blank. However, I can still see the previous feature is still highlighted on the map. What I’m trying to do is this: when a user clicks any widget in the action bar, I want to programmatically close the popup and clear the selection/highlight from the map before the new widget (e.g., Basemap) loads in the Features widget. That way, when a new feature is clicked, its popup loads normally. I noticed that if I manually click the close button on the Features widget before selecting another widget from the action bar, everything works as expected. So, I want to simulate a click on that close button programmatically. I already tried: view.popup.close();
view.popup.selectedFeature = null; featuresWidget.close()
... View more
|
0
|
2
|
83
|
POST
|
Thanks, but that approach won't work. You're suggesting the use of: document.getElementById(<button id>).click() However, the button ID is dynamically generated at runtime. For example, it looks like: calcite-action-aa0a2d95-2dee-4f9d-4007-45da792b6f6e-button This ID changes every time the FeatureWidget is initialized, making it unreliable to reference directly by ID.
... View more
|
0
|
1
|
85
|
POST
|
Would like to simulate clicking the close button of the features widget. I tried this but it is not working. I suspect it is because of the shadow root. const closeBtn = document.querySelector(".esri-features__close-button");
if (closeBtn) { closeBtn.click(); } Ideas? Thanks.
... View more
2 weeks ago
|
0
|
8
|
208
|
POST
|
Does this widget complies with the Google terms or service for their products? Google TOS prohibits the use of their products on non Google based apps.
... View more
02-13-2025
10:18 AM
|
0
|
1
|
291
|
POST
|
Something like this? https://svctenvims.dot.ca.gov/env_viewer/
... View more
11-15-2024
06:18 PM
|
0
|
1
|
169
|
POST
|
@KittyHurley Is it possible to apply style to just one of the list items?
... View more
11-07-2024
04:32 PM
|
0
|
2
|
657
|
POST
|
Any updates on this request to add menu when clicking on an item of the action bar? This is an alternate way of accomplishing the same task but not very visual appealing. <calcite-action id="action1" text="Settings" icon="gear" scale="m"></calcite-action>
<!-- Popover Menu for Action Item 1 -->
<calcite-popover reference-element="action1" placement="right-start" width="m">
<calcite-list>
<calcite-list-item label="Option 1"></calcite-list-item>
<calcite-list-item label="Option 2"></calcite-list-item>
<calcite-list-item label="Option 3"></calcite-list-item>
</calcite-list>
</calcite-popover> @KittyHurley @BenElan ? Thank you.
... View more
11-07-2024
10:29 AM
|
0
|
0
|
233
|
POST
|
Thank you Ken. After hours of working on this problem, found out that the issue was of how the REST service for this layer was published. After it was republished, the issue went away. However, you script assisted with faster loading of large datasets.
... View more
10-16-2024
09:52 AM
|
0
|
0
|
545
|
POST
|
Thank you for the response @KenBuja . Yes, your solution works for that layer. I used that layer in my example because it is visible on the public. However, my issue is with another layer that I cannot share. I am sharing the code of how I define the template, and a brief video to show the issue. const featureLayer = new FeatureLayer({
url: "https://xyz/MapServer/0",
outFields:['*'],
});
map.add(featureLayer);
view.when(() =>{
const popupTemplate = featureLayer.createPopupTemplate();
featureLayer.popupTemplate = popupTemplate;
})
... View more
10-11-2024
03:55 PM
|
0
|
2
|
607
|
POST
|
For some feature layers, when you click on a feature, you expect the popup to be displayed on the features widget panel, but it just opens and closes the widget immediately! https://codepen.io/lkoumis1/pen/poXqjxR It's similar to the example posted here. The only difference is that I added a feature Layer instead of using a webmap. https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=widgets-features
... View more
10-11-2024
09:27 AM
|
0
|
4
|
656
|
POST
|
09-05-2024
04:50 PM
|
0
|
0
|
290
|
POST
|
Is it possible to change the font style for a component of the calcite-navigation? For example, can I change the color and font size of just the heading? Thanks.
... View more
08-29-2024
07:03 PM
|
0
|
0
|
746
|
Title | Kudos | Posted |
---|---|---|
1 | 06-02-2023 03:22 PM | |
1 | 02-28-2024 09:35 AM | |
2 | 12-19-2023 06:48 PM | |
1 | 12-06-2023 11:03 AM | |
1 | 06-26-2023 09:20 AM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|