Setting Survey123 map extent/zoom from URL

711
2
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!

2 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.