Hello,
Our team is looking to see if Instant Apps can use a device's location as a URL parameter? Ideally, when the user opens the app it would ask for permissions for location then auto zoom to the device's location (no need for the user to interact with the location tracking button).
Is this possible? I wasn't able to find any info in the documentation.
Thanks,
Amanda Huber
This is not currently possible in the apps but its something we could look into for a future release. In Nearby and Lookup there is an option to add a "Use my location" button the the intro window that makes the current location option more visible.
https://jsapi.maps.arcgis.com/apps/instant/lookup/index.html?appid=b3ba72a9a2b94f50bc89f0e048991107
Which app(s) are you using where you'd like to see this functionality?
Hi @KellyHutchins ,
Thanks for your response, that's good to know. I think there would be a lot of value for Instant Apps to have this functionality.
We're currently using the sidebar app and media map for this project, but I could see this being useful across all instant apps as many times admins are configuring apps for their user's locations.
Thanks,
Amanda Huber
In the upcoming release of ArcGIS Online you will be able to configure Zone Lookup and Nearby to use the users location when the app loads.
In Sidebar and Media you can use a url param to add support for this to your app. The url param is startupLocation so your url would look like this:
Hi @KellyHutchins,
Thanks so much for your response. I tested the Sidebar example you sent and unfortunately we're not seeing any prompt for a starting location. It still just centers on California (and we're based out of MN).
I tested this on one of our apps as well and saw the same behavior, no device location prompt.
Any suggestions?
Thanks,
Amanda Huber
@Amanda__Huber Sorry for the confusion it's not live yet. It will be included in the June 2025 update of ArcGIS Online currently planned for this evening: https://status.arcgis.com/
Ah thank you! Missed that was also part of the update.
Thanks so much, we look forward to testing more tomorrow then 🙂