|
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
|
3506
|
|
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
|
1680
|
|
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
|
1239
|
|
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
|
1864
|
|
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
|
1892
|
|
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
|
2099
|
|
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
|
2103
|
|
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
|
1200
|
|
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
|
4938
|
|
POST
|
Is the "myCustomData" based on information from the feature? Based on the attributes? You could have that method be the content and create the elements when the popup opens. That would be the recommended way. You can tweak that getDynamicContent method if you really need to function getDynamicContent(content) {
return () => {
const div = document.createElement("div");
div.innerHTML = content;
return div;
}
}
... View more
06-15-2022
12:32 PM
|
0
|
1
|
2584
|
|
POST
|
What does "applyEditsToIncidents" look like? Is it passing the options correctly?
... View more
06-15-2022
12:28 PM
|
0
|
7
|
4943
|
|
POST
|
What if you make the content function async? Seems odd that it loads all the images up front. I'd think the method only gets executed when the popup loads.
... View more
06-15-2022
10:51 AM
|
0
|
3
|
2602
|
|
POST
|
Ah, if you're using the globalId, you need to pass the globalIdUsed property as true in the options. There's a snippet in the doc here further down the page https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits
... View more
06-14-2022
01:07 PM
|
0
|
9
|
4956
|
|
POST
|
Looking at the doc, the attachmentForm should be an object with feature and attachment, not just a form, so it knows which feature to attach it. https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#AttachmentEdit I think you need to do this after you do addFeature, because it looks like you need the objectId or globalId to add the attachment. So you would do your edit in two steps.
... View more
06-14-2022
08:17 AM
|
0
|
12
|
4979
|
|
POST
|
You can turn off popup highlights here https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#highlightEnabled
... View more
06-09-2022
09:21 AM
|
0
|
0
|
1987
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 2 | 3 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 |
10 hours ago
|