Zum Hauptinhalt gehen

Viewer for HTML5 Feature Layer Access

Kommentare

1 Kommentar

  • Permanently deleted user
    I will answer my own question now that I have the solution! (All of the information below is using GC v 2.5.2 and its supported ESRI JS version- 10.3?). The JS API just changed documentation at the site to v 10.4 this morning.

     

    First of all, the getFeatureLayer() method does not return the ESRI FeatureLayer. It is a GC Layer object. My code didn't work above because I'm fairly new to JavaScript, and there is a known conundrum when using callbacks (as in the function inside the then() method above) as far as evaluating the looping variables. A special auxiliary/helper method needs to be built, that when executed, actually evaluates the value of (in this case- layer), and returns the callback function. A simple google search on the conundrum should return plenty of results.

     

    The JS ES2015 update has answered this annoyance with the let keyword. By declaring variables with let, they are scoped and evaluated instead of hoisted.

     

    To further answer the ESRI FeatureLayer access problem-- there really does not appear to be a solution either in the ESRI framework or the GC framework as far as gaining access to FeatureLayer objects from ArcGISDynamicMapServiceLayer objects. In this case, I will need to force the administrator to add the layer as a FeatureLayer when configuring the map, instead of adding as a Map Service.
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.