I am experiencing some issues working with ArcGIS JS API v4.9. I created a map on my offline software that I imported into ArcGIS Online. The map contains polygons with labels inside them and some arrows. In ArcGIS Online they are rendered correctly.

Now, when I use this map inside JS API, some of the labels are placed incorrectly (they are far from the center, sometimes they are rendered outside their polygon). Arrows have the issue where the arrowheads are not rendered at all, only the base line that marks the direction of the whole arrow. There are no error messages in the console, so I have a hard time debugging this issue.

WebGL for Feature Layers is enabled. I initiate my WebMap like this:

let webmap = new Webmap({
    portalItem: {
        id: "id-of-map-hosted-in-arcgis-online"

And my view like this:

let view = new MapView({
    container: "viewDiv",
    map: webmap,
    center: [...],
    zoom: 18,
    higlightOptions: {...},
    showLabels: true

I would like to know the source of my issues.

Why is it rendered differently in ArcGIS Online and when using ArcGIS-JS-API 4.9?


The render is different because ArcGIS Online uses the ArcGIS-JS-API 3.27, and you are using the Verison 4.9 in your code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.