Hi everybody,I'm doing this example https://developers.arcgis.com/en/javascript/jssamples/routetask_closest_facility.html but I have a problem about the facilities creation.
facilitiesGraphicsLayer.add(new Graphic(new Point(-13626477, 4549415, map.spatialReference)));
facilitiesGraphicsLayer.add(new Graphic(new Point(-13625385, 4549659, map.spatialReference)));
facilitiesGraphicsLayer.add(new Graphic(new Point(-13624374, 4548254, map.spatialReference)));
facilitiesGraphicsLayer.add(new Graphic(new Point(-13624891, 4548599, map.spatialReference)))
The problem is whenever I create a map with a new different location (like Alabama, New York state...) I have to create a new facilities Point for that map. So can anybody can help me about creating automatically the facilities Point and routes when I make a new different location map and click on it ? Thank you for your reading time about my topic ! Best wishes for you. :rolleyes: