I am looking at the example and having a hard time trying to figure out how to replace the hospital locations defined in the facilitiesOverlay, with features that I would have in a RestEndpoint. Say my hospitals were in a RestEndPoint....
GraphicsOverlay {
        id: facilitiesOverlayI think this would have to be manipulated as well?
    function createFacilities() {
        featureLayerFishing.featureTable.forEach(function(graphic) {
        //featureLayerFishing.graphics.forEach(function(graphic) {
            var facility = ArcGISRuntimeEnvironment.createObject("Facility", {geometry: featureLayerFishing.geometry});
            facilities.push(facility);
        });
    }
I should be able to place the FeatureLayer in the map as such correct?
I tried to modify the createFacilities function above but did no justice as I am not sure how to approach this...
Any thoughts?
        Map {
            BasemapStreets {}
            initialViewpoint: ViewpointCenter {
                Point {
                    x: -13041154
                    y: 3858170
                    spatialReference: SpatialReference { wkid: 3857 }
                }
                targetScale: 1e5
            }
            FeatureLayer {
                id: featureLayerFishing
                ServiceFeatureTable {
                    id: featureTable0
                    url: "https://vvv.vvv.vvv.gov/arcgis/rest/services/Projects/vvv/FeatureServer/2"
               }
            }
            onLoadStatusChanged: {
                createFacilities();
                task.load();
            }
        }
Based on the FeatureTable doc, FeatureTable QML Type | ArcGIS for Developers, I don't think you can call forEach out of the QML type.
The key here is to query the features from the FeatureTable, then add them (the geometry) to the facilities array.
alright will look into that....thanks Erwin