|
POST
|
Could you provide a use case for how you would use the value? I haven't seen this request before, but we can look at adding it if we know what the use case is.
... View more
10-22-2025
09:54 AM
|
0
|
1
|
1309
|
|
POST
|
As promised, I think this is easier to do now in 4.34 with our beta Popup component. https://codepen.io/odoe/pen/JoGOaev?editors=1000 <arcgis-map item-id="45725ba7d9fb47a0925398919b13d1fa">
<arcgis-popup slot="popup"></arcgis-popup>
</arcgis-map>
<script type="module">
// Update code here
const mapElement = document.querySelector("arcgis-map");
const popupElement = document.querySelector("arcgis-popup");
await mapElement.componentOnReady();
// The action object that defines the action.
let viewRotateAction = {
title: "Rotate",
id: "rotate",
icon: "rotate"
};
function rotateView() {
// This property is on the element
let rotateAngle = mapElement.rotation + 45;
// This method is on the element too
mapElement.goTo({
rotation: rotateAngle
});
};
popupElement.actions.push(viewRotateAction);
popupElement.addEventListener("arcgisTriggerAction", (event) => {
if (event.detail.action.id === "rotate") {
rotateView();
}
});
</script> This is less code to write and more intuitive. Now yes, Popup comp is in beta, but it's really close. Since it's in beta, if you notice anything weird, let us know. Note: The snippet in my previous post for 4.33 will still work in 4.34 and if you don't want to use beta Popup component, stick with that for now.
... View more
10-21-2025
08:15 AM
|
2
|
1
|
979
|
|
POST
|
This is an interesting one, I hadn't really though about. Making note of it though. So components have most of the same props and methods that the View does, so you can access them directly on the component. With components, you can do a couple of things. Set properties on components before they are fully loaded. These properties will be used during component set up. Access properties/methods after component is loaded, something like map or goTo. Popup is kind of special, it is a lazy loaded property, so it's not a real popup until you click on the map. The view.popup has some magic in it to let you do the listeners on it before it's really a popup. We don't have that bit of magic on the component, not really, so need a couple of extra steps to do this. https://codepen.io/odoe/pen/wBMPEmw?editors=1000 const mapElement = document.querySelector("arcgis-map");
// Set popup actions as an empty array
mapElement.popup = {
actions: []
};
// Wait for the map component to fully be ready
await mapElement.viewOnReady();
// The action object that defines the action.
let viewRotateAction = {
title: "Rotate",
id: "rotate",
className: "esri-icon-rotate"
};
// Add the action to the pop-up actions.
mapElement.popup.actions.push(viewRotateAction);
// The function defining the operation.
function rotateView() {
// This property is on the element
let rotateAngle = mapElement.rotation + 45;
// This method is on the element too
mapElement.goTo({
rotation: rotateAngle
});
};
// Wait for the popup to be visible, just once
// At this point, it's a Popup instance
// and you can listen for events
when(
() => mapElement.popup.visible,
() => {
// Implement the event for the action.
mapElement.popup.on("trigger-action", function(event) {
console.log("Returned event: ", event)
if (event.action.id === "rotate") {
rotateView();
}
});
}, {
once: true
}
); This might be easier in 4.34, so keep an eye out. Edit - Yes, this will be much easier in 4.34.
... View more
10-16-2025
02:45 PM
|
1
|
2
|
1075
|
|
POST
|
If you want to control the popup on click, you'll need to disable the popup first. If you don't do this, on click, the default popup behavior will win and can sometimes conflict with you trying to open it. https://codepen.io/odoe/pen/ByjmyBb?editors=1000 <arcgis-map item-id="45725ba7d9fb47a0925398919b13d1fa" popup-disabled>
</arcgis-map>
<script type="module">
// Update code here
const mapElement = document.querySelector("arcgis-map");
mapElement.addEventListener("arcgisViewClick", (event) => {
const {
mapPoint
} = event.detail;
mapElement.openPopup({
location: mapPoint,
title: "You clicked here",
content: "This is a point of interest"
});
});
</script>
... View more
10-15-2025
11:20 AM
|
1
|
1
|
562
|
|
POST
|
There was recently an issue on this in the calcite repo. You can view the solution here: https://github.com/Esri/calcite-design-system/issues/12931#issuecomment-3366724689 If you're angular set up is close their example app, there are couple of spots in the angular json you can update.
... View more
10-14-2025
11:27 AM
|
0
|
0
|
1207
|
|
POST
|
Looks like this is fixed in the upcoming 4.34 release. Thanks! If you need to handle this in the 4.33 release, you can add `auto-destroy-disabled` attribute to the component. https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-features/#autoDestroyDisabled
... View more
10-02-2025
09:26 AM
|
0
|
1
|
373
|
|
POST
|
For now, you want to use the `arcigs-placement` component to position custom content in the map components. https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-placement/ https://codepen.io/odoe/pen/emJJeaW?editors=1000 This will be easier to accomplish in the upcoming release, thanks!
... View more
09-26-2025
02:43 PM
|
0
|
1
|
481
|
|
POST
|
This is the default behavior for GraphicsLayer and Views https://codepen.io/odoe/pen/RNWdObm?editors=100 The "view.graphics" or with components, "viewElement.graphics" is a graphics layer under the hood, but is always on top.
... View more
09-08-2025
01:30 PM
|
1
|
0
|
660
|
|
POST
|
I was finishing up for the day, but couldn't pass this up. Yes, you can do this! It's a little different today, then what I would have probably done even a year ago, but here you go. https://github.com/odoe/arcgis-ts-vite-cdn We have an $arcgis helper only available on the CDN that you can use. You need to type it yourself though and add the core typings. You'll install core, but not use it except for types. Edit - may not need this reference type, but you let me know if you can remove it, lol /// <reference types="@arcgis/core/interfaces.d.ts" />
declare global {
interface Window {
$arcgis: { import: <T>(modules: string | string[]) => Promise<T> };
}
}
export {}; Then you can do this. const [Bookmarks, Expand, MapView, WebMap] = await window.$arcgis.import<
[typeof __esri.Bookmarks, typeof __esri.Expand, typeof __esri.MapView, typeof __esri.WebMap]
>([
"@arcgis/core/widgets/Bookmarks.js",
"@arcgis/core/widgets/Expand.js",
"@arcgis/core/views/MapView.js",
"@arcgis/core/WebMap.js",
]);
const webmap = new WebMap({
portalItem: {
id: "e691172598f04ea8881cd2a4adaa45ba", // World Topographic Map
},
}); This should work. It works in this sample app, but I have never done this exact scenario until today, so take that for what it's worth. I've done lots of other TS/CDN/AMD stuff, so yeah. This is one of those things I always told myself will work, so yeah, I'm glad to see it does.
... View more
08-28-2025
03:57 PM
|
2
|
0
|
1038
|
|
POST
|
Great question, as this has come up a couple of times. Yes, this is expected. Lots of apps will remove and add elements to the page at runtime, and custom elements have a built in lifecycle method to handle what to do when that happens. If we didn't destroy everything, this would lead memory leaks. Every map-component has an autoDestroyDisabled property you can set to disable this behavior. This is useful to maintain maps and layers that might be used in other places in your application. Note, that this now puts the responsibility of calling the component destroy method on the developer when they are done to prevent memory leaks. Not necessarily. In the next release it should be easier to hide components via css classes if you want to avoid adding/removing them.
... View more
07-31-2025
04:55 AM
|
1
|
1
|
642
|
|
POST
|
The `layers` property of the FeatureTable is meant as a settable property by the user. We can update this documentation to make it more clear of the purpose. It does not auto-populate with layers from the provided map that show in the dropdown. You set it to override what layers that appear in the dropdown. Here is a demo showing setting and reading `layers` when the table is used by itself.
... View more
07-30-2025
10:12 AM
|
0
|
2
|
608
|
|
POST
|
You can currently add custom content to an expand using the `arcgis-placement` component inside expand. https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-placement/ Here is your snippet updated. <arcgis-map basemap="gray-vector" zoom="14" center="-88.1, 41.5">
<arcgis-search position="top-left"></arcgis-search>
<arcgis-zoom position="top-left"></arcgis-zoom>
<arcgis-home></arcgis-home>
<arcgis-locate scale="5000"></arcgis-locate>
<arcgis-swipe swipe-position="32"></arcgis-swipe>
<arcgis-expand position="top-right">
<arcgis-layer-list></arcgis-layer-list>
</arcgis-expand>
<arcgis-expand expand-icon="information" position="top-right">
<arcgis-placement>
<div id="infoDiv">
<h2>Helpful Vocabulary*</h2>
<p><b>CD</b> Closed Depression Area-- low area of a field with no outlet that accumulates or receives
runoff.
In times of spring meltdown or heavy rainfall, runoff channels may form and deliver runoff water to
closed depressions.
</p>
</div>
</arcgis-placement>
</arcgis-expand>
</arcgis-map> https://codepen.io/odoe/pen/LEVwaqa?editors=1000
... View more
07-07-2025
10:22 AM
|
1
|
0
|
583
|
|
POST
|
Found it! You have the old AMD types installed too, remove those and you should be good. https://github.com/CI-CMG/pointstore-dashboard/blob/main/package.json#L21 Probably want to remove "src" from includes in the node tsconfig too https://github.com/CI-CMG/pointstore-dashboard/blob/main/tsconfig.node.json#L27
... View more
07-03-2025
02:16 PM
|
1
|
1
|
1183
|
|
POST
|
Tried this out with a new vite TS app and not seeing this. Could you try deleting your node_modules/package-lock.json/yarn.lock and try again? If you have a github repro, can take a look.
... View more
07-03-2025
09:23 AM
|
0
|
3
|
1204
|
|
POST
|
"reference-element" is the attribute name, only to be used declaratively. "referenceElement" is the property name, which be accessed via "element.referenceElement". It would also be used in jsx syntax for various UI libraries. https://developers.arcgis.com/javascript/latest/programming-patterns/#attributes-and-properties
... View more
06-23-2025
09:11 AM
|
1
|
0
|
1239
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 2 | 2 weeks ago | |
| 1 | 02-27-2026 06:31 AM | |
| 1 | 01-13-2026 02:15 PM | |
| 1 | 12-31-2025 09:05 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 hours ago
|