Popup Config

2385
4
10-24-2012 10:47 AM
RandyHauser
New Contributor III
I am trying to configure feature popups in the Flex viewer. Basically I want the popup to resemble the popups used in ArcGIS Explorer online. Two columns like a table. I have tried standard html code with no success. Any help would be greatly appreciated. I have attached an image of the popup schema I would like to use in my Flex application.
Tags (2)
0 Kudos
4 Replies
BjornSvensson
Esri Regular Contributor
You can't really get the same table/color/alignment, but assuming you are working with the popup configuration file, just list the fields you want to include and don't add a <description> tag.  If there is no <description> tag, the visible fields will be shown in a key-value table format.

For example, see http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Pop_up_configuration_files/01m3... for something like:
<?xml version="1.0" ?>
<configuration>
    <title>Parcel</title> 
    <fields>
        <field name="APN" visible="true"/>
        <field name="OWNER"  alias="Owner" visible="true"/>  <!-- Overwrite alias specified in Map Service -->
        <field name="TRACK_DATE">
            <format dateformat="shortDateShortTime"/>
        </field>
    </fields>    
</configuration>  
0 Kudos
RandyHauser
New Contributor III
Thanks Bjorn, that worked well. Anyway to bold a portion of the popup outside of the description tag? I would like something like this:
<b>APN:</b> {apn_key}. Here is a copy of my current config file:

<?xml version="1.0" ?>
<configuration>
    <title>Parcel</title>
    <fields>
        <field name="APN" alias="APN:" visible="true"/>
        <field name="Owner"  alias="Owner:" visible="true"/>
  <field name="S_Address1" alias="Address:" visible="true"/>
  <field name="M_Address1" alias="Mailing:" visible="true"/>
        <field name="TRACK_DATE">
            <format dateformat="shortDateShortTime"/>
        </field>
    </fields>   
</configuration>
0 Kudos
ZhiqiangLiu
New Contributor
I am having the same problem. I tried to use a css file to format the popup window, it seemed not working.

I tried some inline style or use something like <font> tag, not working either.

It looks like the popup xml file can recognize some html element like <p>, but it won't recognize any style tags.

I hope there's a good way to customize the popup.
0 Kudos
BjornSvensson
Esri Regular Contributor
It looks like the popup xml file can recognize some html element like <p>, but it won't recognize any style tags.


The popup is using the HTML support that is part of the Adobe Flash Player. This support for HTML in the flash player is quite limiting, and a bit funky.  See http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Pop_up_configuration_files/01m3... for more info on that, or go to the Adobe page for more details: http://livedocs.adobe.com/flex/3/html/help.html?content=textcontrols_04.html
0 Kudos