POST
|
For reference, the argisViewReadyChange event will fire when one of three things happens. The `item-id` is updated The `map` property is replaced The `basemap` property is replaced Without looking at how state/page loads are being handled in a React application, tough to tell when things are being updated and re-rendered. This event is driven by the View.ready property on views. If you want to maintain the state of the map component in a SPA type app, you can enable the autoDestroyDisabled property so that the component will not destroy itself if it is removed and added back to the page.
... View more
a week ago
|
0
|
1
|
120
|
POST
|
That documentation is not official. Someone downloaded the doc from the downloads page and put that up. 4.4 is about 8 years old, so there is no view.then anymore, view.when is what you want to use.
... View more
2 weeks ago
|
1
|
0
|
159
|
POST
|
If you are using React 18, you need to use the map-components-react wrapper to get proper bindings. React 19+ supports native web components, but not 18. https://www.npmjs.com/package/@arcgis/map-components-react
... View more
3 weeks ago
|
0
|
1
|
247
|
POST
|
Looking at this blog post, it looks like you would need to set it up in your organization. https://www.esri.com/arcgis-blog/products/arcgis-online/announcements/esri-vector-basemaps-for-united-states I haven't done this, but you might be able to go through each one and assign the region in Map Viewer.
... View more
3 weeks ago
|
0
|
0
|
281
|
POST
|
For your basemap gallery question, you want to create a PortalBasemapSource. https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapGallery-support-PortalBasemapsSource.html You can provide a query for basemaps to load. This sample shows it's use. https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/
... View more
3 weeks ago
|
0
|
0
|
355
|
POST
|
You can accomplish this by leaving the item-id and basemap empty attributes on the arcgis-map component, then creating your own map/basemap as needed. https://www.esri.com/arcgis-blog/products/js-api-arcgis/developers/how-to-use-a-basemap-with-a-specific-world-view-in-your-web-app <arcgis-map>
</arcgis-map>
<script type="module">
const VectorTileLayer = await $arcgis.import("@arcgis/core/layers/VectorTileLayer.js");
const ArcGISMap = await $arcgis.import("@arcgis/core/Map.js");
const Basemap = await $arcgis.import("@arcgis/core/Basemap.js");
const mapElement = document.querySelector("arcgis-map");
// create a VectorTileLayer from a style URL
const mapBaseLayer = new VectorTileLayer({
url: "https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/styles/arcgis/topographic",
// set the worldview as a custom parameter
customParameters: {
worldview: "unitedStatesOfAmerica"
},
});
const basemap = new Basemap({
// set the VTL as the basemap layer
baseLayers: [mapBaseLayer]
});
mapElement.map = new ArcGISMap({
basemap
});
</script> https://codepen.io/odoe/pen/dPPEvgY?editors=1000
... View more
3 weeks ago
|
0
|
0
|
357
|
POST
|
You can set this up via the SearchSource as the resultSymbol. https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search-LayerSearchSource.html#resultSymbol If it worked via the resultGraphic, it was in error as that is supposed to be readonly property in both the component and the widget.
... View more
3 weeks ago
|
0
|
0
|
223
|
POST
|
You can listen to the arcgisViewChange event. This event emits when stationary toggles and you can reference the properties related to the view. Demo: https://codepen.io/odoe/pen/gbbZWNP?editors=1001
... View more
a month ago
|
0
|
1
|
220
|
POST
|
Events on components are custom events, so you can find the point on "event.detail.mapPoint". We'll make this clearer in the 4.33 documentation release.
... View more
a month ago
|
1
|
1
|
186
|
POST
|
Tough to tell, could you provide a basic repro on github? Not sure how the modal is created, is it a react portal or do you add/remove the map? A repro would really help to figure it out.
... View more
05-08-2025
08:06 AM
|
1
|
0
|
118
|
POST
|
There is no way to remove the depreciation warning if that's what you're asking. You will need to eventually migrate to components, as widgets will go away in a future release.
... View more
05-06-2025
03:50 AM
|
0
|
1
|
308
|
POST
|
That arcgisViewReadyChange event will only fire after you provide a map, so you need to wait for the events of each one to finish and then use it. Here is a demo https://codepen.io/odoe/pen/LEEmMoG?editors=1000
... View more
05-05-2025
01:14 PM
|
0
|
3
|
340
|
POST
|
You can listen to the "arcgisViewReadyChange" event of the map/scene components and when that event fires, you can create Widgets using the readonly `element.view` of the components. The `view` property provided for users migrating apps from widgets to components. https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-map/#arcgisViewReadyChange
... View more
05-05-2025
08:47 AM
|
0
|
1
|
368
|
POST
|
By default, when you use item ids on the components, we can only support a single portal. However, if you need to support multiple portals in your app, you can omit the item-id attribute and assign the element.map property with your own webmap and portal url. This will allow you to work with maps from multiple portals.
... View more
05-05-2025
07:01 AM
|
0
|
3
|
404
|
POST
|
You can use the `arcgisPropertyChange` event to check the state of the component. If the state is ready, than `lastRoute` has been updated. <arcgis-map center="-118,34" zoom="12" item-id="45b3b2fb35e94ab09381d0caa0da5946">
<arcgis-directions position="top-left" use-default-route-layer></arcgis-directions>
</arcgis-map>
<script type="module">
const directionsElement = document.querySelector("arcgis-directions");
directionsElement.addEventListener("arcgisPropertyChange", (e) => {
if (
event.detail.name !== "state" ||
directionsElement.state !== "ready"
) {
// You only care about when the `state` of the component is "ready"
return;
}
if (directionsElement.lastRoute) {
console.log("New directions are set");
}
})
</script> https://codepen.io/odoe/pen/Pwwpxao?editors=1001 We can look at adding the `lastRoute` to trigger this change event as well.
... View more
04-24-2025
04:22 PM
|
1
|
0
|
167
|
Title | Kudos | Posted |
---|---|---|
1 | 04-02-2025 08:51 AM | |
1 | 2 weeks ago | |
1 | a month ago | |
1 | 05-08-2025 08:06 AM | |
1 | 04-24-2025 04:22 PM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|