Skip to main content

Open Maptips Popup of a feature in WAB

Comments

2 comments

  • Permanently deleted user

    I am using 'Show Feature Popup' with

    Features =$query1.results.features

    The popup opens on the map but it is blank. If I click on the map the popup shows up as expected.

     

    Here is the workflow using LA_County_Training_Data_Set

     

    0
  • Permanently deleted user

    It seems that 'Show Feature Popup' does not use the Popup configurations from a layer in an ArcGIS Online Map.

    'Set Feature Popup' needs to be used to manually create a popup template, before callling 'Show Feature Popup'.

     

    This is bit of a pain as I have to try and configure it the same as it looks on the map. By default the popup from ArcGIS online has styling applied, which is hard to try and match. Anyway it is a workaround for now.

    Am I going about this wrong?

     

    So here is my template in 'Set Feature Popup' which mimics the ArcGIS Online popup. So if a user clicks on the map or runs the work flow , the popup will be the same.

     

    ={ title: "ZipCodes: {NAME}", 

    description: "<table class='attrTable' cellpadding='0px' cellspacing='0px'>\

    <tbody>\

     <tr valign='top'>\

      <td class='attrName'>Name</td>\

      <td class='attrValue'>{NAME}</td>\

     </tr>\

     <tr valign='top'>\

      <td class='attrName'>State Code</td>\

      <td class='attrValue'>{ST_FIPS}</td>\

     </tr>\

     <tr valign='top'>\

      <td class='attrName'>City Code</td>\

      <td class='attrValue'>{CTY_FIPS}</td>\

     </tr>\

     <tr valign='top'>\

      <td class='attrName'>Zip Code</td>\

      <td class='attrValue'>{ZIP}</td>\

     </tr>\

    </tbody>\

    </table>"}

     

    0

Please sign in to leave a comment.