Select to view content in your preferred language

Help on basic popup config

1255
2
Jump to solution
12-18-2013 05:24 AM
anne-laurefernet
Deactivated User
Hello,

I am with arcgis server 10.0 and flex 2.5, quite a new user.

I have a mapservice that works well, and was able to add the identify widget to get information on the objects. I would like to replace this by popups : instead of using Identify, I would like to be able to click on the map (on a line for instance) and get a window that displays a field of my layer.

I am not able to make the popup work, nothing happens with what I have now, despite all the topics I checked on that subject, I cannot understand the process of the congif for popup. Do I have to specify the code of the layer I want to use information from? This is not clear for me.

If you ever have time to take a look, here are the configs I have:

config file :
<layer label="Mapservice" type="dynamic" visible="true" alpha="0.7" url="http://server/arcgis/rest/services/Mapservice/MapServer"
   popupconfig="popups/PopUp_eligibilite.xml"/>

popup config file:
<configuration>
    <title>{Résultat}</title>
    <fields>
        <field name="RESULTAT" alias="Résultat" visible="true"/>
    </fields>
<medias>
    <media type="image"
           title="Resultat"
           imagesource="assets/images/i_bookmark.png"/>
</medias>
    <showattachments>true</showattachments>
</configuration>

Hope somebody will be able to help! Meanwhile I keep looking,

thanks

Anne
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AnthonyGiles
Honored Contributor
Anne,

If you are using a feature service type you can specify the popup within the layer tag like you have done. If you are using a dynamic map service (which you are) you need to use sub layers, eg:


<layer label="Demographics" type="tiled" visible="false" alpha="0.5"
    url="http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Median_Household_Income/MapServ...">
    <sublayer id="0" popupconfig="popups/PopUp_Demographics_BlockGroups.xml"/>
    <sublayer id="1" popupconfig="popups/PopUp_Demographics_BlockGroups1.xml"/>
</layer>

The sublayer Id refers to the layer id in the map service REST endpoint. This way you can specify different popups for each of your layers in your map service (they can also all point to the same popup xml if you wish)

Help on this can be found here:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Dynamic_Tiled_Feature_and_Image...

Hope this helps

Regards

Anthony

View solution in original post

0 Kudos
2 Replies
AnthonyGiles
Honored Contributor
Anne,

If you are using a feature service type you can specify the popup within the layer tag like you have done. If you are using a dynamic map service (which you are) you need to use sub layers, eg:


<layer label="Demographics" type="tiled" visible="false" alpha="0.5"
    url="http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Median_Household_Income/MapServ...">
    <sublayer id="0" popupconfig="popups/PopUp_Demographics_BlockGroups.xml"/>
    <sublayer id="1" popupconfig="popups/PopUp_Demographics_BlockGroups1.xml"/>
</layer>

The sublayer Id refers to the layer id in the map service REST endpoint. This way you can specify different popups for each of your layers in your map service (they can also all point to the same popup xml if you wish)

Help on this can be found here:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Dynamic_Tiled_Feature_and_Image...

Hope this helps

Regards

Anthony
0 Kudos
anne-laurefernet
Deactivated User
Anthony,

Thank you very much, it works very well indeed!
I got how to define the layers for popup and how tp link it with the popupconfig.
I'll work on this now to improve my popups.

Thanks again!

Anne
0 Kudos