|
POST
|
Take a look at the FeatureLayerView and client-side queries samples in the doc. https://developers.arcgis.com/javascript/latest/sample-code/featurelayerview-query-geometry/ This will let you get the features that are currently in view. Be sure to note the limitations.
... View more
11-20-2023
05:57 AM
|
0
|
1
|
743
|
|
POST
|
SSR and these "client" renderers are a little odd in some frameworks. So yes, those client components are rendered, but in some cases they are still loaded during ssr. I think Nuxt will automatically load js, even if not rendered from "components" folders. Looks like there are some tricks around this, but I always default to dynamic loading. This will work in your case. const BASEMAP = "topo-vector";
export async function initialize(container: HTMLDivElement) {
const [{ default: Map }, { default: MapView }, { default: Home }] =
await Promise.all([
import("@arcgis/core/Map"),
import("@arcgis/core/views/MapView"),
import("@arcgis/core/widgets/Home"),
]);
const map = new Map({
basemap: BASEMAP,
// layers: [landGroup]
});
const view = new MapView({
map,
container,
zoom: 10,
center: [-120.8345, 44.2998],
popupEnabled: true,
popup: {
dockEnabled: true,
dockOptions: {
// dock popup at bottom-right side of view
buttonEnabled: true,
breakpoint: true,
position: "bottom-right",
},
},
});
const homeWidget = new Home({
view: view,
});
view.ui.add(homeWidget, "top-left");
await view.when();
return view.when();
}
... View more
11-11-2023
08:14 AM
|
0
|
1
|
6522
|
|
POST
|
You should remove your api key from your snippet. You can probably accomplish what you want to do with Calcite components. Here is a tutorial similar to what you want. https://developers.arcgis.com/calcite-design-system/tutorials/create-a-mapping-app/ The action-bar also support a horizontal layout. https://developers.arcgis.com/calcite-design-system/components/action-bar/ The calcite tutorials and documentation should help you accomplish what you're trying to do.
... View more
11-03-2023
01:38 PM
|
0
|
1
|
1213
|
|
POST
|
dom.byId can be replaced with document.getElementById, and dojo/on is just a shortcut for addEventListener. You don't need domReady in modern browsers today. There's really no reason to rely on those dojo utilities in your apps today.
... View more
11-03-2023
07:57 AM
|
0
|
0
|
2727
|
|
POST
|
A single layer instance can only be placed in one map. But a single map can be used in multiple views. Here is an example from the samples in the docs. https://developers.arcgis.com/javascript/latest/sample-code/views-composite-views/
... View more
11-03-2023
07:56 AM
|
0
|
0
|
857
|
|
POST
|
If you reference dojo via cdn and the Maps SDK via CDN, you are loading the dojo loader twice. You should probably point the dojo path to previous versions of the Maps SDK CDN. You can even reference all the old dojo related libs if you need them, but it is highly recommended you stop using these and migrate to native js/browser implementations. https://developers.arcgis.com/javascript/latest/4.25/#removal-of-non-esri-packages-from-cdn <script>
window.dojoConfig = {
packages: [{
name: "dojo",
location: "../../3.42/dojo"
},
{
name: "dijit",
location: "../../3.42/dijit"
},
{
name: "dojox",
location: "../../3.42/dojox"
},
{
name: "dgrid1",
location: "../../3.42/dgrid1"
},
{
name: "dstore",
location: "../../3.42/dstore"
}
]
};
</script>
... View more
11-02-2023
11:01 AM
|
1
|
0
|
2748
|
|
POST
|
Your GP service says the data type for Area_of_Interest is a GPFeatureRecordSetLayer You can find more details on that data type on this page. https://developers.arcgis.com/rest/services-reference/enterprise/gp-data-types.htm There are various ways to define it. That page has various samples on how to define the input.
... View more
10-31-2023
07:27 AM
|
2
|
1
|
1496
|
|
POST
|
You can load the layer, then add your custom content to the PopupTemplate content. https://codepen.io/odoe/pen/oNmjejJ?editors=1000 featureLayer.load().then(() => {
const customContent = new CustomContent({
creator: () => {
return "<div>I am custom</div>";
}
});
featureLayer.popupTemplate.content.push(customContent);
map.add(featureLayer);
});
... View more
10-26-2023
10:41 AM
|
1
|
0
|
4357
|
|
POST
|
Do the check on both values like !isNaN(obj.geometry.latitude) && !isNaN(obj.geometry.longitude)
... View more
10-17-2023
02:40 PM
|
0
|
0
|
6879
|
|
POST
|
There could be some invalid data. If I add NaN values to coords, no points will display. The one valid point will display if you change to NaN to null though. https://codepen.io/odoe/pen/ZEVdNBJ?editors=1000 You might need to filter the data to validate it before you create the layer.
... View more
10-17-2023
02:22 PM
|
0
|
2
|
2690
|
|
POST
|
Try to wrap your coords in Number(node.getAttribute('lng')), see if that helps. Although I think you would get a different error if the coords as string was an issue. What if you assign the y/x instead of lat/lon? If you had a small sample in codepen or similar to debug, would help.
... View more
10-17-2023
01:11 PM
|
0
|
1
|
2706
|
|
POST
|
Been a while since I used 3x, but I believe the behavior is the same as 4x in this regard. Features are requested generalized from the server (saves on bandwidth), so when you copy them to a GraphicsLayer, and zoom in, they will be overly generalized at the new scale. In 4x, there are methods to handle this via Effects and FeatureEffect, as well as the 4x Highlight which uses the oids. If I had to tackle this in 3x, I would take the following steps: Save the oids of my current selection On scale change, clear selection Create a new selection using saved oids Yes, this involves more requests, but is probably a cleaner solution. Maybe in 3x, you could manually query the results, with a 0 maxAllowable offset (I don't know if that's right) and use the results at all scales, but that could be slow to draw given how complex the linework is (and I know yours can be, lol).
... View more
10-11-2023
11:18 AM
|
2
|
1
|
3904
|
|
POST
|
FeatureLayer isn't really the right tool for fast updates like this, using mouse move events. GraphicsLayer would be the first option, but you said you want to use the renderer of a FeatureLayer. In that case, another option might be a client-side StreamLayer. There's a sample showing how to use this client-side. https://developers.arcgis.com/javascript/latest/sample-code/layers-streamlayer-client/ Here's a modified version using points. https://codepen.io/odoe/pen/MWZzLbY?editors=1000
... View more
10-06-2023
10:53 AM
|
1
|
1
|
3464
|
|
POST
|
Organization accounts are different from developer accounts. Org accounts should not be using API keys. That's why you don't have that option. Sorry, it may not be completely clear in all the doc, but org accounts should be using OAuth. Info: here: https://developers.arcgis.com/javascript/latest/secure-resources/
... View more
10-06-2023
04:37 AM
|
1
|
1
|
1868
|
|
POST
|
Did you add the layer to your API key scope in the API Key management console? Layers via API Keys is still a beta feature, but you can try it out. https://developers.arcgis.com/documentation/mapping-apis-and-services/security/api-keys/#private-content-items
... View more
10-05-2023
06:47 AM
|
0
|
3
|
1914
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks 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 |
Monday
|