Experience Builder: Zoom in to map on user click

3668
9
03-02-2021 12:55 PM
Status: Open
JayJohnsonWashoeCounty
Occasional Contributor III

In Experience Builder, when the user clicks on a feature on the map, I'd like to zoom the map in to a predetermined scale.

Currently, if the user clicks on a feature in a list you can create an Action that zooms in to that feature on a related map.  I want this same action on the map itself.  Click the feature, zoom in to it.  

Tags (2)
9 Comments
MatthiasDufour

Hi JayJohnsonWashoeCounty,

It is already possible to zoom to on a feature.
In your Map widget, you must add a “Select Data Records” trigger to your List widget.
And in your List widget, you must add a "Zoom to" trigger.
It works on my Experience:
http://epavesdugrizzly.fr/?page=page_0&views=liste

Matthias

JayJohnsonWashoeCounty

Yes, what you have working in your Experience looks good.

I don't seem to have the option to do this:  "In your Map widget, you must add a “Select Data Records” trigger to your List widget."  See screen shot.AddingTriggerProblem.PNG

 

Thanks

MatthiasDufour

You can click on "Framework" and You have two options :

  • Filter Data Records
  • Select Data Records

You chose "Select Data Records" AddingTriggerProblem.PNG

 

 Then, you indicate the layer of your map for the first choice and the layer of your list for the second choice.
trigger.png

 Then, in the List Widget, you define your trigger "Zoom to".

AlanLX
by

IN ENGLISH BELOW

 

Bonjour,

J'aimerai également réalisé cette opération mais je n'arrive pas.

Je m'explique : J'ai une couche cartographique (carte) qui comprend différents bâtiments d'un campus. J'ai ensuite ajouté un widget "filtre" (sous forme de liste déroulante) pour que les utilisateurs puisse sélectionner le bâtiment qui les intéresse. Mon souhait que lorsqu'un bâtiment est sélectionné dans la liste, un zoom soit réalisé sur la carte.

Suivant vos explications, j'ai été dans les "actions" de ma "carte" pour "ajouter un déclencheur". Ensuite j'ai choisi "modifications de sélection d'enregistrements" puis cliqué sur "Structure" et enfin sur "sélectionner les enregistrements". 

À ce moment-là, je dois choisir dans les paramètres de l'action les "données sur déclencheurs" et les "données de l'action". Cependant, dans aucun des deux je ne peux choisir ma liste qui doit être la source. 

Est-ce que j'ai raté quelque chose ?

Merci d'avance pour votre aide. 

Capture d’écran 2021-07-01 à 10.40.25.pngCapture d’écran 2021-07-01 à 10.40.32.png

 

Hello,

I would also like to carry out this operation but I cannot.

Let me explain: I have a cartographic layer (map) that includes different buildings on a campus. I then added a filter widget (dropdown list) so that users can select the building they are interested in. My wish that when a building is selected in the list, a zoom is carried out on the map.

Following your explanations, I was in the "actions" of my "map" to "add a trigger". Then I chose "record selection modifications" then clicked on "Structure" and finally on "select records".

At this point, I have to choose in the parameters of the action the "data on triggers" and the "data of the action". However, in neither of the two can I choose which list should be the source.

Did I miss something?

Thank you in advance for your help.

MatthiasDufour

Bonjour,

L'exemple précédent fonctionne pour le widget "Liste".

À ma connaissance, il n'est pas possible de définir de déclencheur avec un widget "Filtre".

Ce que vous voulez est très simple à faire, mais avec une liste.

Question, comment faites-vous une liste déroulante avec le widget "Filtre" ?

 

Hi,

The previous example works for the "List" widget.

To my knowledge, it is not possible to define a trigger with a "Filter" widget.

What you want is very easy to do, but with a list.

Question, how are you making a drop-down list with the "Filter" widget?

 

AlanLX
by

Bonjour,

Merci pour votre retour. Oui, effectivement, j'utilise le widget FILTRE et pas LISTE car avec je n'arrive pas à faire une liste déroulante qui reprend l'ensemble des éléments (uniques) d'un champ avec les listes.

C'est possible avec la liste ?

Par ailleurs, ci-dessous les images des options pour réaliser une liste déroulante avec le widget FILTRE :

Capture d’écran 2021-07-01 à 15.06.51.png

Capture d’écran 2021-07-01 à 15.07.16.png

Capture d’écran 2021-07-01 à 15.07.07.png

Capture d’écran 2021-07-01 à 15.09.14.png

Hi,

Thanks for your feedback. Yes, indeed, I use the FILTER widget and not LIST because with it I cannot make a drop-down list which includes all the (unique) elements of a field with the lists.

Is it possible with the list?

In addition, you can see up with pictures the options for creating a drop-down list with the FILTER widget.

 

 

MatthiasDufour

Bonjour,

 

Merci pour ces infos. Elles vont me servir.

Pour  la liste, dans l'élément individuel de la liste, vous ajoutez un widget "Texte" que vous connectez à vos données et vous ajoutez le champ attendu.

Ainsi, vous vous retrouvez avec une liste de vos bâtiments.

Il vous suffit d'ajouter un déclencheur directement dont la cible est votre carte directement depuis l'onglet "Action".

 

 

Hi,

 

Thank you for this info. They will serve me.

For the list, in the individual item of the list, you add a "Text" widget that you connect to your data and you add the expected field.

So you end up with a list of your buildings.

You just need to add a trigger directly whose target is your card directly from the "Action" tab.

wayfaringrob

Hey @JayJohnsonWashoeCounty  - did you ever find a solution to this without adding another widget? The options presented in the comments seem to be discussing zooming the map from another widget; you seem to be interested in zooming the map from a click within the map widget. I'd also like to implement this in my application, so I'm curious if you ever figured it out. Thanks!

JayJohnsonWashoeCounty

No, I haven't gotten this to work.