|
POST
|
That endpoint is a FeatureService, but the utility endpoint is different. Assuming you have a FeatureService, you can use a FeatureLayer and add it to the Map. Here is the doc https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html Here's a tutorial on the subject as well. https://developers.arcgis.com/javascript/latest/add-a-feature-layer/
... View more
07-11-2022
10:51 AM
|
0
|
0
|
2611
|
|
POST
|
4x does use the geolocation api, we just don't have the accuracy symbology. You can add it though with the info from the widget. Here's a sample. https://codepen.io/odoe/pen/zYpmEMB?editors=1000 You can even add a line or polygon for the heading from the widget info.
... View more
07-11-2022
10:48 AM
|
0
|
1
|
4799
|
|
POST
|
Sorry, I'm not sure. CSS is not my expertise. Could be you there are some additional classes on certain widgets on small screen sizes. Might need some inspection and trial and error.
... View more
07-01-2022
09:07 AM
|
0
|
0
|
1612
|
|
POST
|
are you getting errors in the console? I'd imagine if it was the api key you would get a login prompt. What are you build tools? How are you referencing the API key env variables in your app? Maybe a repro project? Could be the browserlist? Could be something else, tough to tell. There are some sample projects here you can look at too. https://github.com/Esri/jsapi-resources/tree/master/esm-samples I've seen this issue with default browserlist in some frameworks, check our note here with the react sample https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-create-react-app#misc
... View more
06-30-2022
10:25 AM
|
1
|
1
|
1903
|
|
POST
|
I prefer to isolate references to the JSAPI in the store or utility modules, but components not to import things like the Map or MapView directly.
... View more
06-28-2022
06:36 AM
|
0
|
0
|
3952
|
|
POST
|
I don't want to dictate it as the right way, but this is an example of how I manage ArcGIS JSAPI in Vue. https://github.com/odoe/nearby-app/blob/main/src/store.ts You can also use shallowRef in components for stuff if you like. This will just wrap the instance in a Proxy and not all of it's props https://vuejs.org/api/reactivity-advanced.html#shallowref I very much recommend that ArcGIS JSAPI not be referenced directly in components, but again, that is just my opinion.
... View more
06-27-2022
08:54 AM
|
0
|
0
|
3969
|
|
POST
|
Try loading the non-esm version like this https://js.arcgis.com/calcite-components/1.0.0-beta.81/calcite.js That should work better in a wordpress env
... View more
06-24-2022
03:21 PM
|
0
|
0
|
2124
|
|
POST
|
There's not a specific component for something like this as far as I know, but you can put one together. I just did a blog post on this in regards to using it with view padding. https://odoe.net/blog/view-padding
... View more
06-22-2022
12:01 PM
|
1
|
0
|
1373
|
|
POST
|
Can you change the expression to something like this? var myUrl = 'https://test.com/' + $feature.ID
return `<a href="${myUrl}">Click to learn more.</a>`
... View more
06-21-2022
08:55 AM
|
0
|
1
|
2126
|
|
POST
|
Here's an Esri blog post that shows how you can do exactly that! Arcade is amazing, ha. https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/part-1-introducing-arcade-pop-up-content-elements/
... View more
06-20-2022
06:55 AM
|
0
|
3
|
2154
|
|
POST
|
Ah, your app is using the "next" release for 4.24, which isn't officially released. In the sources, change the locator property to url. url: "https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer" It's noted in the breaking changes in the changelog for the next release https://github.com/Esri/feedback-js-api-next/blob/master/CHANGELOG.md#breaking-changes
... View more
06-16-2022
09:42 AM
|
0
|
0
|
2281
|
|
POST
|
It's not the apiKey. Your map is called webmap, but you still reference it as map. const webmap = new WebMap({
portalItem: {
// autocasts as new PortalItem()
id: "55ebf90799fa4a3fa57562700a68c405",
},
});
const view = new MapView({
map, // should be map: webmap
container: "viewDiv",
center: [-119.475, 37.737],
zoom: 5,
});
... View more
06-16-2022
09:16 AM
|
0
|
2
|
2285
|
|
POST
|
What is your attachmentForm? Is it a form or just the image? You need to make it a Blob or FormData to upload it. There's a snippet in the FeatureLayer addAttachment doc that shows how you can do it. https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#addAttachment view.when(function () {
view.on("click", function (event) {
view.hitTest(event).then(function (response) {
const feature = response.results[0].graphic;
// The form is defined as below in the html.
// For enterprise services:
// 1. File input name must be "attachment"
// <form id="attachmentForm">
// Select a file: <input type="file" name="attachment">
// </form>
const attachmentForm = document.getElementById("attachmentForm");
const formData = new FormData(attachmentForm);
// For enterprise services - add input with name:f and value:json
formData.append("f","json");
const form = new FormData();
form.set("attachment", file);
form.append("f","json")
let form = document.getElementById("myForm");
// Add an attachment to the clicked feature.
// The attachment is taken from the form.
layer.addAttachment(feature, form).then(function (result) {
console.log("attachment added: ", result);
})
.catch(function (err) {
console.log("attachment adding failed: ", err);
});
});
});
});
... View more
06-16-2022
09:12 AM
|
0
|
2
|
1313
|
|
POST
|
That's not passing the options. You can update it like this. function applyEditsToIncidents(params, options) {
document.getElementById("btnUpdate").style.cursor = "progress";
obsLayer.applyEdits(params, options).then((editsResult) => {
... View more
06-15-2022
12:34 PM
|
0
|
5
|
5445
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Wednesday | |
| 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 |
| Online Status |
Offline
|
| Date Last Visited |
12 hours ago
|