|
POST
|
I suppose there's a couple of ways you can do this. You can update the source on the BasemapGallery element https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-basemap-gallery/ <arcgis-map item-id="06ca49d0ddb447e7817cfc343ca30df9">
<arcgis-basemap-gallery position="top-right"></arcgis-basemap-gallery>
</arcgis-map> // in your app somewhere
import LocalBasemapsSource from "@arcgis/core/widgets/BasemapGallery/support/LocalBasemapsSource.js";
const bmgElement = document.querySelector('arcgis-basemap-gallery');
bmgElement.source = new LocalBasemapsSource({
basemaps
}); If you want to do it all via JS import LocalBasemapsSource from "@arcgis/core/widgets/BasemapGallery/support/LocalBasemapsSource.js";
const bmgElement = document.createElement('arcgis-basemap-gallery');
bmgElement.position = "top-right";
bmgElement.source = new LocalBasemapsSource({
basemaps
});
document.querySelector('arcgis-map').appendChild(bmgElement);
... View more
02-26-2025
09:27 AM
|
1
|
3
|
1976
|
|
POST
|
Can you verify that the versions of calcite being referenced are the same? Calcite 3.0.2, the t9n files are named message.ko.json, not message_ko.json. The CDN asset may not be the same version used by ExB. I'm not familiar with the versions being used, but sounds like the issue.
... View more
02-18-2025
08:16 AM
|
1
|
0
|
990
|
|
POST
|
There's a goTo method on the map component. You can use a useRef to access the component and it's methods.
... View more
02-07-2025
12:35 PM
|
0
|
1
|
2040
|
|
POST
|
This isn't perfect, but does mostly work. https://codepen.io/odoe/pen/jENpyGy?editors=0010 let handle;
view.on("pointer-down", (e) => {
// right-click
if (e.native.which === 3) {
// drag
handle = view.on(
"pointer-move",
debounce((event) => {
const mp = view.toMap(event);
view.goTo(mp);
// mouse up from drag
let handle2 = view.on("pointer-up", () => {
handle.remove();
handle2.remove();
});
})
);
}
});
... View more
01-17-2025
01:38 PM
|
1
|
0
|
1308
|
|
POST
|
Yeah, any listeners you create with "on" you need to clean up. The "on" method returns an object with a "remove()" method you can use for that. https://developers.arcgis.com/javascript/latest/api-reference/esri-views-draw-DrawAction.html#on
... View more
12-16-2024
09:20 AM
|
0
|
0
|
829
|
|
POST
|
This is a useful blog post that is still relevant for adding things like buttons to your popup. https://www.esri.com/arcgis-blog/products/js-api-arcgis/mapping/using-html-with-popups-in-the-arcgis-api-for-javascript/
... View more
12-11-2024
02:38 PM
|
1
|
1
|
1089
|
|
POST
|
Currently, you can use the arcgis-placement component for this. <arcgis-map>
<arcgis-placement position="top-right">
<my-custom-component></my-custom-component>
</arcgis-placement>
</arcgis-map>
... View more
12-06-2024
11:24 AM
|
1
|
1
|
1457
|
|
POST
|
There's some work being done on calcite and core side for css variables like this, so at some point will be able to get conventions down as intended.
... View more
12-06-2024
08:55 AM
|
0
|
0
|
2526
|
|
POST
|
You can try adjusting some of the calcite css variables. It takes a little inspection to see what variables are used where. But this works. .esri-widget--button {
--calcite-icon-color: white;
background-color: red;
}
.esri-widget--button:hover {
--calcite-icon-color: blue;
--calcite-color-foreground-2: green;
} https://codepen.io/odoe/pen/JoPGYBB?editors=1000
... View more
12-05-2024
10:09 AM
|
0
|
2
|
2542
|
|
POST
|
You can use symbolUtils to help you out here. https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-support-symbolUtils.html const symbol = await getDisplayedSymbol(graphic);
const previewElement = await renderPreviewHTML(symbol, options);
... View more
11-15-2024
02:30 PM
|
0
|
0
|
795
|
|
POST
|
It's the print service, not the SDK. It's taking longer than usual to load and should be up and running in a bit.
... View more
11-13-2024
08:18 AM
|
1
|
1
|
1249
|
|
POST
|
Because the Popup is now lazily loaded, it's not a full Popup instance until a feature with a popup template is clicked. To interact with the popup manually, there are two methods on the view you an use. https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#openPopup https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#closePopup This should get you the behavior you are looking for.
... View more
11-12-2024
08:17 AM
|
1
|
0
|
3498
|
|
POST
|
When you import the class and you type it like that, ptGraphicsLayer is of type constructor for Graphic, so it's like your telling TS it can do "new ptGraphicsLayer()". You can use a utility type to help you out here with InstanceType. import Polyline from "@arcgis/core/geometry/Polyline";
import type FeatureLayer from "@arcgis/core/layers/FeatureLayer";
import type GraphicsLayer from "@arcgis/core/layers/GraphicsLayer";
import type Layer from "@arcgis/core/layers/Layer";
import { Point } from "@esri/calcite-components/dist/types/components/graph/interfaces";
export function graphicsLayerFn(ptGraphicsLayer: InstanceType<typeof GraphicsLayer>) {
ptGraphicsLayer.graphics.forEach((element: any) => {
return element.id; // do something
});
} Now everything is much stricter and you need to update the code a bit. There is no public graphicsLayer.items.array property. You might see it in devtools, but it's not publicly typed or doc'd like that, so I updated the code to reflect those changes. Also anything you import that is only for types, you can add the "import type", it's really more for organization. TS should strip the import if it's unused or other bundlers will. But it will also give you a warning if you try to use it as anything other than a type, which can be useful.
... View more
10-28-2024
05:24 PM
|
1
|
0
|
1677
|
|
POST
|
You can still import arcgis/core modules as needed. You could create your own Map/WebMap with whatever layers you want and provide it to the `ArcGisMap` component's `map` property. I don't have an example showing that, but this demo mixes the components and use of core. https://github.com/odoe/arcgis-map-comps-nextjs/blob/main/app/map/%5Bslug%5D/page.tsx You don't need to use the ArcGisMap ui to place your components, just don't make them children of the map component and they have a property called referenceElement you pass a reference too. This does require you have a useRef for each component and for the map to hook it up. Each component has a `referece-element`/`referenceElement` you can use. https://developers.arcgis.com/javascript/latest/references/map-components/?path=/docs/component-reference-search--docs In the map and scene components, you can provide your own map as well. https://developers.arcgis.com/javascript/latest/references/map-components/?path=/docs/component-reference-map--docs
... View more
10-22-2024
01:36 PM
|
1
|
0
|
4867
|
|
POST
|
You can download the documentation for previous releases here. https://developers.arcgis.com/javascript/latest/downloads/
... View more
09-16-2024
01:51 PM
|
2
|
1
|
1194
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 05-19-2026 02:12 PM | |
| 1 | 04-24-2026 11:01 AM | |
| 2 | 04-21-2026 07:06 AM | |
| 1 | 02-27-2026 06:31 AM | |
| 1 | 01-13-2026 02:15 PM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|