Setting Survey123 map extent/zoom from URL

942
5
11-19-2021 09:02 AM
BrennanSmith1
New Contributor III

I have a survey that I created in Survey123 Connect (3.12.232).  The user drops a point and records some fields.  I have a webmap set up to view these points, with a custom URL in the popup to allow them to create a copy of a point in a new survey (&mode=copy&globalId={globalid}), with an incremental increase in my "tree number" identifier.  For now, all the surveys are being done inside a browser, not the mobile application.

The URL link works as intended (the new survey's geopoint is set at the desired location), but the map in the survey does not re-center on this geopoint.  The location and extent of the map are fixed to the zoom level/lat/lon from the "detailed map" in the "map" tab of my Survey123Connect. 

Is there a way to override this zoom/extent behavior in my survey's map? Can the URL tell the survey where to center the map?

I tried an alternate approach of setting "&center=lat,lon" in the URL, but that just defines the geopoint and doesn't change the map. I couldn't find any resources about controlling extent/zoom for a survey map, only for webmaps.  The user will be adding dozens of points at each site cluster, and it would really streamline things if they didn't have to zoom/pan back to the site each time.  Thanks!

5 Replies
by Anonymous User
Not applicable

I know you posted this in 2021, but did you ever figure this out?  I think I'm attempting to do the same thing with no results.

0 Kudos
abureaux
MVP Regular Contributor

You can do this for the app via the Map tab. Set "Zoom level" to the desired level, and your geopoint will zoom to that level by default*

abureaux_0-1701368139849.png

*ONLY for the Field App though. If you are using a web form, the "level" is ignored. There is also a "level" URL parameter that compliments "center", but S123 seems to ignore that entirely regardless if it's the web or app.

AndrewWallick
Occasional Contributor

I'm also trying to get this to work. Can we get someone from Esri to comment whether this should be possible or not?

0 Kudos
PegGronemeyer1
New Contributor III

I would also appreciate some guidance on this.  My zoom in/out is 'jerky' when I'm testing a survey on the field app on my computer.  It is like the app doesn't want me to zoom.  

0 Kudos
BrennanSmith1
New Contributor III

I don't know if ESRI made some updates, but I got some notifications about this thread and figured I'd check back in.  My tools seem to be working as initially intended now.  I set the map zoom like abureaux described (for both the Preview map and Detailed map in S123 Connect), and I can set my location in the URL using either mode=copy, or by using center=latlon from an expression. The surveys seem to be zoomed and centered on my desired point, both in the web form and the native application either windows or android.

If people are still having issues, I can explain in a little more detail how I have mine set up.

0 Kudos