Get a NAME from a select one box and use that value to plot in the map through geopint

802
9
11-19-2020 12:41 PM
Telmo
by
New Contributor II

Hello,

  I have a select_one list with several places pre defined for the user. After the selection i have a Map (geopoint element) and i want to pin in that map the location from the previous question automatically. Any ideas how can i do it?

Example:

select_one list question has the VALUE of LISBON, i want lisbon to pass automatically to the geopoint element and pin it on the map

 

Thank you

0 Kudos
9 Replies
Jing_Sun
Esri Contributor

Hi Telmo,

You can find 2 examples of populating the geopoint question from the Survey123 Connect's samples.

Base on your description I would suggest the 'Calculate Location from CSV' method.

JingSun2_0-1606028580809.png

 

0 Kudos
Telmo
by
New Contributor II

Hello,

 

 I knew those options, but the first one is in cascade, meaning, first i choose q continent and then based on that choice i will have a list of cities which will be mapped. This is what i want to do, but in one step, choosing diectly the place and mapping directly. I haven't managed to do so.

From a CSV list, in this case, is not an option.

 

Thank you

0 Kudos
Jing_Sun
Esri Contributor

Hi Telmo,

Cascading select is not required for the first example. All you need is the concat() statement to state the geometry for the geopoint question. In the screenshot below I removed the continent question and the choice_filter associates with it, so user will only select from a list of cities.

Perhaps you just need an edited concat() statement for your geometry values. Would you mind sharing an example of your choice list?

Jing_Sun_0-1606056312335.png

Jing_Sun_1-1606056666556.png

 

0 Kudos
Telmo
by
New Contributor II

Hello,

  The list, for now, as a test is this

Telmo_0-1606060010602.png

However, when i erun the survey the result is this

Telmo_1-1606060051247.png

 

It put the right coordinates, but in the text box inside the geopoint element doesn't show anything and it does not zoom to the point.

 

Any ideas?

 

Thanks

 

0 Kudos
Jing_Sun
Esri Contributor

Hi Telmo,

Am I correct that your geopoint question is now receiving the correct coordinates, and the pin is at the correct location, but the map is just not zoom into that location? Are you seeing this behaviour in Survey123 Connect?

I found some discussions regarding the map doesn't zoom into the location, the only recommendation is to publish from the latest version of Survey123 Connect.

I am not sure which text box inside the geopoint element you are referring to, is it the search? I don't think that will be populated with the name of the location so it would be blank.

0 Kudos
Telmo
by
New Contributor II

Hello Jing,

 Yes, i am using survey123 connect, and i am viewing in a web browser. What i was expecting was to see in the texto box the coordinates, like in the example. which i don't. However, if i go to the map it zooms to the coorrect place. I was hoping the same kind of behaviour liking writing the name in the box. Meaning, close to the "+" appeared the coordinates like in your previous post

0 Kudos
Jing_Sun
Esri Contributor

Hi Telmo,

One thing I think would cause this is the decimal separator. Some languages use decimal comma instead of decimal point. If you normally use decimal comma, perhaps you can try and change the decimal point to decimal comma in the choice list?

0 Kudos
Telmo
by
New Contributor II

Yes, i did try and doesn't work with comma, it has to be decimal dot.

It plot in the right place, but as i said before in the text box of geopoint doesn't show the coordinates and it does not zoom.

0 Kudos
Jing_Sun
Esri Contributor

Hi Telmo,

Sorry I can't think of any other reason causing this. For me, using the example in Survey123 Connect and the coordinates you provided, the geopoint question in Survey123 web form zooms into the right location with populated values in the coordinate textboxes.

I suggest republishing the survey using the latest version of Survey123 Connect, if still not fixed, please contact your local Esri distributor or Esri Support.

0 Kudos