Select to view content in your preferred language

Popups for polygon

792
5
12-12-2011 09:17 PM
DessentArnaud
Emerging Contributor
Hello

I have a problem, and I don???t understand where it comes from.
I created some popups for various layers in my application.
All of my layers are declared as dynamic to preserve the symbology.
When I try to use the popups on a point layer, it works.
But when I try this on a polygon layers, the popups don???t show up.
I don???t understand where is the problem. If I change the layer type to feature, the popups work.
I think this is not an error in the code. Moreover when I use the search widget, popups appear.
Do you think I???ve done a mistake somewhere or is the polygon type not compatible with de the declaration of dynamic type?
Tags (2)
0 Kudos
5 Replies
ManishkumarPatel
Deactivated User
can you share your code snippet for better understanding.

Thanks!!
0 Kudos
DessentArnaud
Emerging Contributor
Of Course

The code of the file config.xml :

<operationallayers>
   <layer label="Espaces" type="dynamic" visible="false" url="myserver/arcgis/rest/services/Espaces/MapServer">
    <sublayer id="1" popupconfig="popups/PopUp_ZA.xml"/>
    <sublayer id="2" popupconfig="popups/PopUp_OCS.xml"/>
   </layer>
        </operationallayers>


And the code of the popups file
<?xml version="1.0" ?>
<configuration>
    <title>{nom}</title>
    <fields>
  <field name="nom"alias="Nom"/>
        <field name="type" alias="Type de Zone" visible="true"/>
  <field name="commune"alias="Commune" visible="true"/>
  <field name="contact"alias="Contact" visible="true"/>
  <field name="telephone"alias="Telephone" visible="true"/>
</fields>
</configuration>
0 Kudos
IvanBespalov
Frequent Contributor
a.dessent,

seems like xml attribute construct error:

<?xml version="1.0" ?>
<configuration>
<title>{nom}</title>
<fields>
<field name="nom"alias="Nom"/>
<field name="type" alias="Type de Zone" visible="true"/>
<field name="commune"alias="Commune" visible="true"/>
<field name="contact"alias="Contact" visible="true"/>
<field name="telephone"alias="Telephone" visible="true"/>
</fields>
</configuration>


try to put whitespace between attributes in XML:
<?xml version="1.0" ?>
<configuration>
<title>{nom}</title>
<fields>
<field name="nom" alias="Nom"/>
<field name="type" alias="Type de Zone" visible="true"/>
<field name="commune" alias="Commune" visible="true"/>
<field name="contact" alias="Contact" visible="true"/>
<field name="telephone" alias="Telephone" visible="true"/>
</fields>
</configuration>


You can validate it here: http://validator.w3.org/#validate_by_input - just copy your xml and validate.
0 Kudos
DessentArnaud
Emerging Contributor
Thanks
But my error don't come from this xml construct error.
That doesn't still work
0 Kudos
RhettZufelt
MVP Notable Contributor
Is that xml for the point or polygon layer?  are your field names the same in both?

R_
0 Kudos