Select to view content in your preferred language

Make popup collapsed by default on small screen

618
2
07-31-2024 12:57 PM
Status: Open
Labels (2)
MattCashen
Regular Contributor

It would be great if the feature popups could be collapsed by default on small screens.  I'm making a parcel viewer app and I have it set to select a parcel and zoom to it via the search bar.  Right now when it does that on the small screen devices the pop up is not collapsed and ends up taking up around 70% of the screen.  You can't even really see the parcel that has been selected.  When the popup is collapsed you can see the map and the parcel that was selected.  It would be a cleaner look for my end users. 

2 Comments
AlixVezina

As a workaround, you may be able to use the Feature Info widget. 

  1. Place the Feature Info widget in a Widget Controller for your mobile/small device view
  2. Connect the Feature Info widget to one or multiple layers for which you need to view the popup
  3. In the Map widget, under Options, disable the toggle "Enable popup"AlixVezina_0-1722895089865.png
  4. Setup a Message action in the Map widget for Record selection changes to open the Feature Info widget in the Widget Controller when a feature is selected
    AlixVezina_1-1722895154929.png

Compare how the default web map popup opens on mobile vs the popup from the Feature Info widget in the Controller:

Feature Info (will always be the same size):

AlixVezina_2-1722895231991.png

Default web map popup (will vary based on popup content)

AlixVezina_3-1722895334509.png

 

 

ESharygin

I'd second this request for a way to simply default pop-ups to collapsed. Is it possible if we don't condition it by screen size? I can use expressions in the title of the pop-up to display the pertinent info in a compact way, which is preferred.

from the docs for ArcGIS Maps SDK for JavaScript, there appears to be a boolean that would have this effect, but I am unclear how to implement it:

collapsed = true