Select to view content in your preferred language

Custom report template map not zooming to geopoint feature

2751
11
08-10-2022 10:44 AM
RyanElvrum1
New Contributor II

Hello,

It appears with the most recent update to Survey123 that the ability to center a map to a point feature when producing a custom report from a survey has been broken.

I have a geopoint that is captured when a survey is submitted with a field name of 'location'. Using a custom report template, I was previously able to center a map in the report on a single point feature. I have shared the expression below. Any clue as to why this function no longer works? Am I missing something? This worked fine in early July and stopped working near the end, so that is why I believe the most recent Survey123 update has something to do with it.

Expression:

${location | mapSettings:"":2400 | size:700:500}

11 Replies
Debbie_Briedwell
New Contributor II

I am having a similar issue, and placed a ticket with Esri on 8/05/22.  No matter what expression I have in the report template, the map will not zoom in to the point.  I have attached examples of the map that returns on the report with the standard template expression and with a custom expression similar to yours.

RyanElvrum1
New Contributor II

Thanks for sharing Debbie. I know the ESRI documentation for the report templates states the "Size: ###:###" portion of the expression has to be at the end as seen in my expression, something that I needed to change when troubleshooting, but after fixing that issue the problem still persists. Hearing of your problem it seems like it's not a configuration problem, but more likely a bug.

 

For me, we just decided to remove the map from our report since it wasn't critically important to have at this time. Another option we looked at was just adjusting the scale to be a lot more zoomed out, since it appears the map stays fixed to a certain point regardless of scale. But ultimately the scale we had to zoom out to to see the feature on the map defeated the purpose of it entirely.

 

I do not have any tickets submitted to ESRI, but if I hear of any resolutions I will try to tag you with the solution.

0 Kudos
Debbie_Briedwell
New Contributor II

Does your map work correctly using the standard syntax? i.e. ${survey_point | size:400:300}

Mine does not zoom correctly using the sample template or a custom template.  Also, my surveys are coming from Survey123 Connect, where I could set the map scale there and it would zoom from that.

We print reports every Friday, and the maps worked fine on Friday July 22nd, and then Friday July 29th the maps in the reports were unusable and have been ever since.

0 Kudos
RyanElvrum1
New Contributor II

I have a report generated on July 12 that worked correctly, and then coincidently our next report was on July 29th and that's when we noticed the issue.

I too created my survey in Survey123 Connect. I have not tried the standard syntax seen in your expression. I would think I would need to rename my geopoint field from 'location' to 'survey_point' in order to test that.

I believe I set my map scale in my expression since I was using a different webmap than the one created when publishing the survey from Survey123 Connect. However, I did remove the map item ID from my original expression seen in my post while testing, which according to the documentation should just default to the web map created with the survey/web form.

Attached are 2 screenshots using the following expressions with the only difference being the map scale:

${location | mapSettings:"":2400 | size:700:500}

${location | mapSettings:"":160000 | size:700:500}

0 Kudos
DougBrowning
MVP Esteemed Contributor

Do you have a map Item ID in there and you just removed it for the post?

0 Kudos
RyanElvrum1
New Contributor II

I did have a map item ID in there originally, but I removed it for the sake of this post and for troubleshooting. I believe if I had no need for setting a custom scale I could simply remove the "mapSettings:"":2400" portion. Probably an easy troubleshooting step to try, but we aren't overly concerned with getting the map working again so we just removed it from the report entirely.

ZhifangWang
Esri Regular Contributor

Hi @RyanElvrum1 @Debbie_Briedwell ,

It seems that this issue does not apply to all cases. Can you please check the spatial reference/WKID of the survey layer that stores the geometry and the web map you use in the report template? Are they identical or not?

RyanElvrum1
New Contributor II

I'm fairly confident that my survey layer stores geometry in a local county coordinate system while the web map was using Web Mercator (Using ESRI basemaps). If that is the suspected problem, then is there any idea why that might cause conflict now when it did not before? The points being placed on the map are spatially correct, it just appears the map is failing to 'Pan' to the feature being reported on. The map centers on a fixed position that does not change regardless of which survey/point is being run through the report.

Thanks.

0 Kudos
Richard_Purkis
Esri Contributor

@RyanElvrum1 

I have been discussing the same issue that was affecting a different customer with @ZhifangWang and I have now logged a BUG. As you say, this only started occurring since the July 28th update. The details of the BUG for your reference are:

  • BUG-000151785 : Map in Feature Report does not zoom to feature when the basemap has a different spatial reference