|
POST
|
It would be the same thing minus the application part. You can expose the view or map on your components for users. You could even build a thin API of methods on your components to handle custom tasks, like zoom to graphics or turn layers on/off. You would probably want to use a build tool like Vite to bundle your components. With Vite you can set the maps sdk as an external dependency. I forget if it's directly in Vite config or as part of the rollup plugin part. But you don't want the maps sdk in your bundles, let the app do that. There is also an option to use any of the web component compilers/frameworks out there like Stencil or Lit, even Svelte can compile to WC.
... View more
04-09-2024
08:17 AM
|
0
|
5
|
4614
|
|
POST
|
Here is a version of an app I have done before in various frameworks, but this one uses vanilla web components. https://github.com/odoe/nearby-app-vanilla If you are using Vite, you can use arcgis/core to build your app and components. Not sure I understand reference to the mapView question, but you could expose a method to like `getMapView` or maybe even a property for when you use the component. If you plan on building your components as your own package that you can use across various apps, do not build the JS SDK modules into your components. You want to treat them as external modules. You can do this by looking at the documentation for your build tools.
... View more
04-08-2024
07:17 AM
|
0
|
7
|
4662
|
|
POST
|
You would listen to the edits event of the Layer you are interested in. The Editor itself will not give you this information.
... View more
03-28-2024
01:49 PM
|
2
|
1
|
1413
|
|
POST
|
I think this will work, you can register the OAuthInfo with the IdentityManager before the components load. <!doctype html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
<title>Map components AMD template</title>
<link rel="icon" href="data:;base64,=" />
<style>
html,
body {
background-color: var(--calcite-ui-foreground-2);
padding: 0;
margin: 0;
width: 100vw;
height: 100vh;
}
</style>
<!-- Load the ArcGIS Maps SDK for JavaScript -->
<link rel="stylesheet" href="https://js.arcgis.com/4.29/esri/themes/dark/main.css" />
<script src="https://js.arcgis.com/4.29/"></script>
<!-- Load the Map Components, but defer loading -->
<script defer type="module"
src="https://js.arcgis.com/map-components/4.29/arcgis-map-components.esm.js"></script>
</head>
<body>
<arcgis-map item-id="d5dda743788a4b0688fe48f43ae7beb9">
<arcgis-expand position="top-right">
<arcgis-search></arcgis-search>
</arcgis-expand>
<arcgis-legend position="bottom-left"></arcgis-legend>
</arcgis-map>
<script>
async function load() {
const IdentityManager = await $arcgis.import(
"esri/identity/IdentityManager",
);
const OAuthInfo = await $arcgis.import("esri/identity/OAuthInfo");
// I can register my OAuthInfo here
console.log(IdentityManager, OAuthInfo);
// The custom elements are not defined yet
console.log(customElements.get("arcgis-map"));
}
load();
</script>
</body>
</html>
... View more
03-28-2024
08:34 AM
|
1
|
0
|
2435
|
|
POST
|
Hi @MeleKoneya1 you can add IdentityManager the same way you would with a regular ArcGIS Maps SDK app, by importing the IdentityManager and creating your OAuthInfos. The pattern for this can vary slightly depending on how you build your app. For that CDN sample, I would do an AMD require or use the $arcgis.import like in this sample https://github.com/Esri/arcgis-maps-sdk-javascript-samples-beta/blob/main/packages/coding-components/templates/amd-script-tag/index.html#L60 Note: $arcgis.import is a CDN only helper function you can use to Promisify AMD require calls. In order for this to load before the components are loaded, I would do this work in a script tag after loading the maps sdk CDN, but before the arcgis-map-components CDN. I might even place the components CDN as the last tag of the body or add a defer attribute. I haven't tried this in a single page CDN app, but one of these patterns should do the trick, if not, let us know, In a built app, with vite or maybe another framework, you could run the IdentityManager and OAuthInfo code in an entry point file and before calling the defineCustomElements() method from the arcgis/map-components. A built app is a little easier to control the order of operations then in a CDN app, but it could be done.
... View more
03-27-2024
03:15 PM
|
1
|
1
|
2496
|
|
POST
|
Could you provide a codepen, github repo, stackblitz, or codesandbox to repro case to look at. It's possible there is data on the map with empty popup template, or some logic in the app to open the popup on click, but not way to tell otherwise.
... View more
03-26-2024
06:39 AM
|
0
|
0
|
3554
|
|
POST
|
There is a DirectionalPad widget, it's not in the corners though, not sure if that would meet your needs https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-DirectionalPad.html
... View more
03-25-2024
01:16 PM
|
2
|
1
|
3945
|
|
POST
|
Sogou isn't in the list of supported browsers, but according to the doc, the root in IntersectionObserver can be Element or Document, as long as it has a viewport. This might be an issue in Sogou.
... View more
03-19-2024
09:02 AM
|
0
|
0
|
1087
|
|
POST
|
If you can provide a repro sample in stackblitz or github, would have a better idea, but not able to repro this issue in samples.
... View more
03-14-2024
07:30 AM
|
0
|
0
|
950
|
|
POST
|
You can use reactiveUtils to watch for when the popup.selectedFeature changes, that should do it. https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#selectedFeature
... View more
03-07-2024
01:14 PM
|
1
|
0
|
1640
|
|
POST
|
Can you create a repo app to review. Vue version? Build tooling? Config set up? Can't tell without more details what might be the issue. Does same thing happen if you use the services or webmap in a vanilla app?
... View more
03-02-2024
08:45 AM
|
0
|
0
|
1245
|
|
POST
|
The closest is the view.ready property. This doesn't necessarily mean that everything is done drawing, only that the map and layers have been loaded. Correction, layers are created, but not yet loaded. https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#ready
... View more
02-29-2024
05:11 PM
|
0
|
5
|
1727
|
|
POST
|
If you make your loop async, I think you can get the behavior you're looking for. https://codepen.io/odoe/pen/MWRWwax?editors=0010 If I was doing this from scratch, I might set it up a bit different, so that the variable was a returned value and not set on each iteration, but this seems to work.
... View more
02-28-2024
04:38 PM
|
1
|
1
|
3402
|
|
POST
|
Looking at the documentation for UpdateWorkflowData it might have been renamed to "candidates" https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflowData.html#candidates
... View more
02-26-2024
03:57 PM
|
1
|
1
|
2468
|
| 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 |
a week ago
|