Dears
I am seeking your assistance in directing me to a tutorial with examples if about how to call and use optimum routing for single or multiple deliveries using Python calls.
Best Regards
Hi @QassimNasir , the code I referred you to cannot be used with ArcGIS Enterprise because API keys are not supported. In that case you should use username and password when creating portal.
portal = arcgis.GIS("https://www.arcgis.com", username="<USERNAME>", password="<PASSWORD>")
Thank you so much. That code can be used for Enterprise as well?
# Connect to the routing service and call itapi_key = "YOUR_API_KEY"portal = arcgis.GIS("https://www.arcgis.com", api_key=api_key)route = arcgis.network.RouteLayer(portal.properties.helperServices.route.url, gis=portal)result = route.solve(stops=stops,start_time="now",find_best_sequence=True,)print_result(result)
if __name__ == "__main__":main()
See https://developers.arcgis.com/documentation/mapping-apis-and-services/routing/optimized-routing/#job-find-an-optimized-route-for-a-truck-delivery
Many thanks
Unforuntely, I find only those
ArcGIS Maps SDK for KotlinArcGIS Maps SDK for SwiftArcGIS Maps SDK for .NETArcGIS Maps SDK for Qt
I could not find Python in there.
@QassimNasirReview the material on this page https://developers.arcgis.com/documentation/mapping-apis-and-services/routing/optimized-routing/ and select ArcGIS API for Python in the code switchers to see the Python code.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.