Select to view content in your preferred language

Zoom not working properly in the results of a query

319
9
Jump to solution
07-22-2025 02:37 AM
Labels (1)
SimonCrutchley
Frequent Contributor

I’ve set up a query to select a number of features based on their attributes and have set the triggers to ‘Show on map’ and ‘Zoom to’ for ‘Records created’ and ‘Flash’ and ‘Zoom to’ for ‘Record selection changes’, but these aren’t working as expected. When I click on the selected record in the filmstrip created by the query, I expect it to zoom to that feature, but it doesn’t.

Also, although I’ve changed the settings in ‘Map – Options’ there is no highlight around the feature, again as there used to be in WAB.

Am I doing something wrong?

I'm working in EB in AGOL.

Ta

0 Kudos
1 Solution

Accepted Solutions
SimonCrutchley
Frequent Contributor

Hi folks,

I talked to some colleagues at work and they suggested a number of things, the key one being that although I have multiple results I need to set the zoom to 'Single' as otherwise it's trying to zoom to all the selected features. It now works and even the highlight has appeared 😊; I guess that must have been a delayed effect?

Anyway, thanks to everyone for their help.

View solution in original post

0 Kudos
9 Replies
Laura
by MVP Regular Contributor
MVP Regular Contributor

I can confirm that it does work. Can you confirm what you have selected for trigger data? if it is customized data you need to ensure that all of your layers are selected.

Laura_0-1753190183587.png

Maybe the zoom scale isn't working for what you need. Have you tried custom zoom scales to see if that makes any difference?

Unfortunately for flash in my case I had to add it in for each layer because I wanted the query to select a different layer on my map to flash so I had to set up my trigger and action data for each one. 

Laura_1-1753190333436.png

 

 

0 Kudos
SimonCrutchley
Frequent Contributor

Hi laura,

Thanks for that. These are my settings, which seem to be the same as yours, except for the scale, which I'd set to 1:5000 previously.

SimonCrutchley_0-1753197540795.png

The first zoom works fine, but after that it goes to random points.

There is never any secondary highlighting for the specific feature, rather than the whole selection.

I'm happy to share the whole app, if you think that would be useful?

 

0 Kudos
Laura
by MVP Regular Contributor
MVP Regular Contributor

As far as this goes: Also, although I’ve changed the settings in ‘Map – Options’ there is no highlight around the feature, again as there used to be in WAB.

I'm wondering if you went into add action - framework - selection data records if it would then work for you because based on your screenshot i don't see that in your message action. 

What do you mean by first zoom? If the query comes up with say 2 results when you click on the first one everything is fine but when you click on the second it doesn't work? Are you allowing single or multiple in the results select mode?

 

0 Kudos
SimonCrutchley
Frequent Contributor

Hi Laura,

I'm afraid I don't fully understand what the various options within 'Framework' do.

As for the second question, yes. Queries generally pull up between 20 - 100 images which I have in a filmstrip, so these are 'multiple'. Clicking on the first one works, but after that it becomes random.

0 Kudos
Laura
by MVP Regular Contributor
MVP Regular Contributor

Try adding this:

Laura_0-1753200351769.png

So your results has this? Multiple?

Laura_1-1753200380536.png

It will then zoom out so all selected (multiple) can be viewed rather than the latest click. 

 

SimonCrutchley
Frequent Contributor

Hi Laura,

I've tried to replicate this, although I'm not entirely sure what I'm doing.

SimonCrutchley_0-1753436768527.png

However, it doesn't seem to have had any effect and the zoom still fails.

Am I doing something wrong?

 

0 Kudos
Ke_Xu
by Esri Regular Contributor
Esri Regular Contributor

Hi @SimonCrutchley,

Would recommend creating a support ticket for this.

 

Thanks,

Ke

0 Kudos
SimonCrutchley
Frequent Contributor

Hi folks,

I talked to some colleagues at work and they suggested a number of things, the key one being that although I have multiple results I need to set the zoom to 'Single' as otherwise it's trying to zoom to all the selected features. It now works and even the highlight has appeared 😊; I guess that must have been a delayed effect?

Anyway, thanks to everyone for their help.

0 Kudos
Laura
by MVP Regular Contributor
MVP Regular Contributor

Yup that's why I asked if your selection was set to multiple and what I meant when I said it will zoom out to all selected aka so they can all be viewed. 

0 Kudos