| Bug-ID-Nummer |
BUG-000123451 |
| Eingereicht | July 1, 2019 |
| Zuletzt geändert | June 5, 2024 |
| Gilt für | ArcGIS API for JavaScript |
| Gefunden in Version | 4.12 |
| Status | Non-Reproducible
Dieses Problem konnte bei Tests durch das Entwicklungsteam nicht reproduziert werden. Problemen wird u. U. dieser Status zugewiesen, wenn sie nicht reproduziert werden können oder in einer Entwicklungsversion der Software nicht mehr relevant sind. Es wurde jedoch kein Fix zur Problembehebung installiert. Weitere Erläuterungen finden Sie ggf. im Abschnitt "Zusätzliche Informationen" des jeweiligen Problems.
|
Zusätzliche Informationen
GraphicsLayer is added before the view is ready. Update the code to the following and it works correctly:
var layer = new GraphicsLayer();
const map = new WebMap({ portalItem: { id: '3acfce904368451f82b60d5c8a120f82' }});
const view = new MapView({
container: "viewDiv",
map: map,
zoom: 5,
center: [-74, 45]
});
view.when(function(evt) {
map.add(layer);
var sketch = new Sketch({
layer: layer,
view: view
});
view.ui.add(sketch, "top-right");
})
Workaround
Repeat the above steps with this jsbin: https://jsbin.com/tatatedece/edit?html,output
The workaround is to add the image service directly to the map versus adding in the web map and consuming it via ArcGIS API for JavaScript.
Schritte zur Reproduzierung