AnsweredAssumed Answered

closest facility

Question asked by jay.kapalczynski on Dec 20, 2019
Latest reply on Dec 26, 2019 by jay.kapalczynski

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: facilitiesOverlay


I think this would have to be manipulated as well?  

    function createFacilities() {
        featureLayerFishing.featureTable.forEach(function(graphic) {
        // {
            var facility = ArcGISRuntimeEnvironment.createObject("Facility", {geometry: featureLayerFishing.geometry});


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: ""
            onLoadStatusChanged: {