|
POST
|
Hi Jethro, I believe the demo was updated to 4.16 this morning. jsapi-resources/4.x/npm/demo at master · Esri/jsapi-resources · GitHub Hope that helps! Anne
... View more
07-23-2020
09:24 AM
|
0
|
0
|
1099
|
|
POST
|
Hi Richard, Bookmarks are only able to be added to a WebMap. They are not supported in the Map instance. We will try to clarify this in the documentation and we plan on improving the Bookmarks widget to handle this error better. Thanks for your feedback! Thanks, Anne
... View more
07-21-2020
02:49 PM
|
0
|
0
|
5474
|
|
POST
|
Hi Patrick, You could try using a function to set the content of the PopupTemplate. Here's a sample where we do this: PopupTemplate - use functions to set content | ArcGIS API for JavaScript 4.16 In your case, instead of returning a div like the sample does, you would want to return an array of FieldsContent and MediaContent. It would look something like this: const popupTemplate = {
title: 'Survey Location: <strong>{expression/display-location}</strong>',
expressionInfos: [ ... ],
content: setContent
};
function setContent(feature){
const fieldsContent = new FieldsContent({
fieldInfos: [
{
fieldName: 'expression/round-latitude'
},
{
fieldName: 'expression/round-longitude'
},
{
fieldName: 'expression/format-area'
}
]
});
if (feature.graphic.attributes.IMG != false){
const mediaContent = new MediaContent({
mediaInfos: [{
title: 'Survey Location: {expression/display-location}',
type: 'image',
value: {
sourceURL: feature.graphic.attributes.IMG
}
}]
});
return [fieldsContent, mediaContent];
}
return [fieldsContent];
} I haven't tested this out completely so it might need some tweaking, but the idea should work. Also, make sure to include "MediaContent" and "FieldsContent" in your require statement! Hope this helps! Best, Anne
... View more
07-21-2020
11:49 AM
|
0
|
2
|
2012
|
|
POST
|
Could you please share the code where you are experiencing these issues? We tested the map.on("click", ... event on this simple app (https://codepen.io/annefitz/pen/eYJgZwg ) using an iPad running iPadOS and could not reproduce the issue.
... View more
06-18-2020
02:23 PM
|
0
|
2
|
2028
|
|
POST
|
Hi Eric, I would try using Point.fromJSON() instead.
... View more
05-07-2020
04:56 PM
|
1
|
1
|
1398
|
|
POST
|
The doc should now be updated: FeatureFormViewModel.inputFields | ArcGIS API for JavaScript 4.15 We don't normally update the typings in between releases, but if you need this updated in your typings, you can either make the edit to the file locally, or in your app you could do something like (formVM as any).inputFields
... View more
05-07-2020
04:34 PM
|
0
|
3
|
2181
|
|
POST
|
Hi Tim, This is not currently possible for CIMSymbol. You could add labels to your FeatureLayer instead of doing it through the CIMSymbol. See this example: Add labels to a FeatureLayer | ArcGIS API for JavaScript 4.15 There's more information available in the API Reference: FeatureLayer.labelingInfo | ArcGIS API for JavaScript 4.15 Let me know if you have any questions. I hope this helps! Thanks, Anne
... View more
05-07-2020
03:35 PM
|
0
|
0
|
1303
|
|
POST
|
Hi Nicolas, Thanks for pointing this out! You're correct, it's supposed to be "inputFields". We will get this updated in the documentation and typings as soon as possible. Thanks again, Anne
... View more
05-04-2020
04:57 PM
|
0
|
0
|
2181
|
|
POST
|
Hi Dae, The order that you load your modules matters. In your code above, you are loading both of the coordinateFormatter and Point modules, but only reference Point inside of the then(). That makes the code think that the local Point variable is for the coordinateFormatter module, which does not have a constructor. Inside of the then(), after loadModules, try adding a local name for coordinateFormatter first, then Point, as shown below. loadModules([
'esri/geometry/coordinateFormatter',
'esri/geometry/Point'
])
.then(([
coordinateFormatter, Point
]) => {
... your code here Hope this helps! Thanks, Anne
... View more
05-04-2020
04:51 PM
|
1
|
0
|
3991
|
|
POST
|
You can use the sketchViewModel.update event to see when the geometry is being edited (as they do in the Sketch Update Validation sample). The editorViewModel.featureFormViewModel controls the Editor form - you should be able to use set featureFormViewModel.valid to false if the edited geometry is invalid, and that will disable the "update" button on the editor widget. I haven't tested this out yet, but hopefully that will get you going in the right direction! Let me know how it turns out.
... View more
04-27-2020
12:11 PM
|
0
|
1
|
3245
|
|
POST
|
Hi Markos, I'm not sure if this is exactly what you're looking for, but you could try watching the "state" property on the Editor.viewModel: editor.viewModel.watch("state", function(
newValue,
oldValue,
propertyName,
target
) {
console.log(
propertyName + " changed from " + oldValue + " to " + newValue
);
}); See it in action here: https://codepen.io/annefitz/pen/PoPjwoQ Observe the change in state in the console. Hope this helps! Anne
... View more
04-27-2020
09:28 AM
|
1
|
3
|
3245
|
|
POST
|
If it's returning -1, that means that there is no match for the findIndex function. Here's an example using a FeatureLayer and GraphicsLayer: https://codepen.io/annefitz/pen/ExVKzxV
... View more
04-17-2020
11:17 AM
|
2
|
1
|
5188
|
|
POST
|
Hi Cam, If you are trying to move the graphicsLayer above the other layers within the map, you could try using the map.reorder(layer, index) method. If you are just trying to move that specific graphic within your graphicsLayer, you could try using graphicsLayer.graphics.reorder(graphic, index). Let me know if this works for you! Thanks, Anne
... View more
04-16-2020
01:35 PM
|
2
|
3
|
5188
|
|
POST
|
Hi Rajni, You can use the default zoom widget, but set the layout: "horizontal", and then add it to the bottom-right, like this: var view = new MapView({
container: "viewDiv",
map: map,
ui: {
components: ["attribution"] // removes default widgets except for attribution
}
});
var zoom = new Zoom({
view: view,
layout: "horizontal"
});
view.ui.add(zoom, "bottom-right");
... View more
04-13-2020
09:37 AM
|
1
|
5
|
5385
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 1 | 03-04-2026 08:01 AM | |
| 2 | 03-03-2026 05:23 AM | |
| 2 | 03-03-2026 05:53 AM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|