POST
|
HI You don't need to loop trough the layers. The Editor-Widget itself checks the editable layers and add them to the widget. If you would like to do some fine-grained configuration you need to that on: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#layerInfos and even then you do not need to iterate because you define them separately and you can just use them. To mention, your featurelayer are public accessible and everyone can edit them. Working code-sample with your data: <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="description" content="">
<title>Edting</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.20/esri/css/main.css">
<style>
html,
body,
#viewview {
padding: 0px;
margin: 0px;
height: 100%;
width: 100%;
}
</style>
<script src="https://js.arcgis.com/4.20"></script>
</head>
<body>
<div id="viewview"></div>
<script>
require(["esri/widgets/Editor", "esri/layers/FeatureLayer", "esri/views/MapView", "esri/Map"], function(Editor, FeatureLayer, MapView, Map) {
const wfirehydrantSymbol = {
type: "simple",
symbol: {
type: "picture-marker",
url: "https://img.icons8.com/doodle/48/000000/fire-hydrant--v1.png",
width: "20px",
height: "20px"
}
};
const wfirehydrantPopup = {
title: "wfirehydrant",
content: "<br>FID:</br> {FID} <br>z:</br> {z}"
};
const wdistributionpipeSymbol = {
type: "simple",
symbol: {
type: "simple-line",
cap: "round",
color: [0, 172, 230],
width: "5px",
style: "solid"
}
};
const wdistributionpipeLabel = {
symbol: {
type: "text",
color: "black",
haloColor: "white",
haloSize: "1.5px",
font: {
size: "13px",
family: "Noto sans",
style: "italic",
weight: "normal"
}
},
labelPlacement: "above-center",
labelExpressionInfo: {
expression: "$feature.Shape__Length"
}
};
let wdistributionpipePopup = {
title: "wdistributionpipe",
content: "<br>Materal:</br> {MATERIAL_E} <br>CITYENAME:</br> {CITYENAME}"
};
let wtransmissionPipeSymbol = {
type: "simple",
symbol: {
type: "simple-line",
cap: "round",
color: [0, 0, 230],
width: "5px",
style: "solid"
}
};
let wtransmissionPipeLabel = {
symbol: {
type: "text",
color: "black",
haloColor: "white",
haloSize: "1.5px",
font: {
size: "13px",
family: "Noto sans",
style: "italic",
weight: "normal"
}
},
labelPlacement: "above-center",
labelExpressionInfo: {
expression: "$feature.Shape__Length"
}
};
let wtransmissionPipePopup = {
title: "WTransmissionPipe",
content: "<br>Materal:</br> {MATERIAL_E} <br>CITYENAME:</br> {CITYENAME}"
};
const wtransmissionPipe = new FeatureLayer({
url: "https://services3.arcgis.com/0G16ZDbXMbWFq4Wr/arcgis/rest/services/wtransmissionpipe/FeatureServer/0",
popupEnabled: true,
id: "WTransmissionPipe",
renderer: wtransmissionPipeSymbol,
labelingInfo: [wtransmissionPipeLabel],
popupTemplate: wtransmissionPipePopup
});
const wdistributionpipe = new FeatureLayer({
url: "https://services3.arcgis.com/0G16ZDbXMbWFq4Wr/arcgis/rest/services/wdistributionpipe/FeatureServer/0",
popupEnabled: true,
id: "wdistributionpipe",
renderer: wdistributionpipeSymbol,
labelingInfo: [wdistributionpipeLabel],
popupTemplate: wdistributionpipePopup
});
const wfirehydrant = new FeatureLayer({
url: "https://services3.arcgis.com/0G16ZDbXMbWFq4Wr/arcgis/rest/services/wfirehydrant/FeatureServer/0",
popupEnabled: true,
id: "wfirehydrant",
renderer: wfirehydrantSymbol,
popupTemplate: wfirehydrantPopup
});
const map = new Map({
basemap: "osm",
layers: [wtransmissionPipe, wdistributionpipe, wfirehydrant]
});
const view = new MapView({
container: "viewview",
map: map,
center: [43.902257, 26.38444],
zoom: 15
});
const editor = new Editor({
view: view,
snappingOptions: {
enabled: true,
selfEnabled: true,
featureEnabled: true,
featureSources: [{
layer: wfirehydrant
},
{
layer: wdistributionpipe
},
{
layer: wtransmissionPipe
}
]
}
});
view.ui.add(editor, "top-right");
});
</script>
</body>
</html>
... View more
07-15-2021
01:07 AM
|
1
|
1
|
1470
|
POST
|
Hi It looks like that you have open the debug tools with simulating mobile with touch mode, correct? You need to change to "Mobile (no touch)" if you want to see the line between the points. In the real touch mode you do not know where the finger is so it is not possible to draw the line.
... View more
06-14-2021
09:07 AM
|
0
|
0
|
435
|
POST
|
Just to mention API 4.20 is not released yet. WAB to 2.20 is using API 4.19 see also: https://developers.arcgis.com/web-appbuilder/guide/about-versions.htm
... View more
06-08-2021
05:37 AM
|
0
|
1
|
1185
|
POST
|
Hi Michael The line and polygon transformations in 3D got introduced with ArcGIS JS API Version 4.19: Release notes for 4.19 | ArcGIS API for JavaScript If you would like to have the handles for polygon you need to upgrade. To check out how it looks like with 4.17 you can modify the sample in the sandbox: Sandbox: widgets-editor-3d (arcgis.com) and change to 4.17. For ObjectSymbol3DLayer | ArcGIS API for JavaScript the handles for resizing and rotation are available since version 4.15 with introducing Editing in 3D: Release notes for 4.15 | ArcGIS API for JavaScript. Hope that helps.
... View more
06-07-2021
12:58 AM
|
0
|
1
|
691
|
POST
|
Hi Michael The line and polygon transformations in 3D got introduced with ArcGIS JS API Version 4.19: Release notes for 4.19 | ArcGIS API for JavaScript If you would like to have the handles for polygon you need to upgrade. To check out how it looks like with 4.17 you can modify the sample in the sandbox: Sandbox: widgets-editor-3d (arcgis.com) and change to 4.17. For ObjectSymbol3DLayer | ArcGIS API for JavaScript the handles for resizing and rotation are available since version 4.15 with introducing Editing in 3D: Release notes for 4.15 | ArcGIS API for JavaScript. Hope that helps.
... View more
06-07-2021
12:56 AM
|
0
|
0
|
1194
|
POST
|
Your codepen is using 4.18. When I switch it to 4.19 everything works fine for me. Can you check if it also works for you? Thanks
... View more
04-25-2021
11:43 PM
|
1
|
0
|
1256
|
POST
|
Hi Christophe, This issue will be fixed at version 4.19 and will be released end of this week. You already can check by switching the app to https://js.arcgis.com/4.19/. Thanks again for reporting. -Sascha
... View more
04-19-2021
05:47 AM
|
2
|
3
|
1291
|
POST
|
Hi Christophe, We could reproduce the behavior with your minimized reproduction app. It looks like this happen with this specific featurelayer which interferes somehow with the sketching. It looks like a bug and reported it. We get back as soon as this got fixed.
... View more
04-06-2021
01:25 PM
|
1
|
0
|
1346
|
POST
|
Hi Todd, Thank you very much for reporting this. It is a bug in the version 4.16 of the API and will be fixed in the next release. In the meantime you can use the following workaround, instead of evt.coordinates use: evt.vertices[0] Thanks again!
... View more
07-22-2020
09:22 AM
|
0
|
1
|
341
|
POST
|
Hello Michael, I want to let you know that this issue is fixed at 4.15. You can already check the new behavior with the ArcGIS API for JavaScript - next . The new release is coming in the next weeks. Thanks, Sascha
... View more
03-20-2020
08:53 AM
|
0
|
1
|
572
|
POST
|
Hello Tomasz, This is a know limitation for WMS and MapImageLayer. This visual limitations just happens if user tilt that the far away hills/mountains get seen. Workaround: Set the tilt constraints to avoid that the user can tilt to this point where you can see this effect SceneView | constraints Example: var view = new SceneView({
container: "viewDiv",
map: map,
constraints: {
tilt: {
max: 60
}
},
}); This technical limitation would be solved in the future. Regards, Sascha
... View more
01-24-2020
03:29 AM
|
1
|
1
|
477
|
POST
|
Hi Tomasz, Your guess is correct and this is a know limitations also mentioned in the documentation: FeatureLayer --> Read more --> Data Visualization You can check if there are missing features with: maximumNumberOfFeaturesExceeded in FeatureLayerView Check this codepen: https://codepen.io/SaschaBrunnerCH/pen/rNaLpge Regards, Sascha
... View more
12-12-2019
03:05 PM
|
0
|
0
|
211
|
POST
|
Check this page for more information about visualizing points with 3D symbols: Visualizing points with 3D symbols | ArcGIS API for JavaScript 4.13 It includes also more information about the glTF format. And ObjectSymbol3DLayer - resource where to set the link to the glTF.
... View more
12-09-2019
07:33 AM
|
1
|
0
|
839
|
POST
|
...and change MapView with SceneView in the Codepen to get the 3D globe.
... View more
12-09-2019
07:18 AM
|
0
|
0
|
244
|
POST
|
Hello thai mota, Do your shp contains the building-polygones? You can publish this data with ArcGIS Pro or you can publish them directly in AGOL (Shapefiles—ArcGIS Online Help | Documentation). Then you can extrude the buildings. See the blog: What’s new in Scene Viewer (June 2019) or Style polygon layers—ArcGIS Online Help | Documentation for more information. Sascha
... View more
12-09-2019
06:44 AM
|
1
|
0
|
979
|
Title | Kudos | Posted |
---|---|---|
1 | 01-25-2024 11:19 PM | |
1 | 08-21-2023 01:51 AM | |
1 | 08-18-2023 08:07 AM | |
2 | 11-21-2022 04:17 AM | |
1 | 10-18-2022 09:03 AM |
Online Status |
Offline
|
Date Last Visited |
02-20-2024
07:02 AM
|