Select to view content in your preferred language

Image in the pop-up window

2787
3
Jump to solution
05-11-2012 12:43 PM
JanPacina
Emerging Contributor
Hello everyone,
I am trying to display an image in the pop-up window (the URL is stored in the URL field as a text). I  have tried the FrInfoWindowIframe widget, but here I get App error 2036 (as in the preview-app on that page).
I have tried some other ways, but I always get the 2036 error (tried this and checked the resource center, where the img example is missing??).
Please would you help me how to prepare the source code?
My rest services are the following:
Basemap layer
http://mapserver.ujep.cz/ArcGIS/rest/services/SZ_Cechy_Zlutice/CO_Zlutice/MapServer   


Operational layer (the one, where the URL to img is present in the URL field):
http://mapserver.ujep.cz/ArcGIS/rest/services/SZ_Cechy_Zlutice/bod/MapServer


I can use eather the 2.4 or 2.5 viewer.
Thanks a lot for help.
Jan
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Jan,

   Sure here is what you need in the main config.xml

            <layer label="Obce" type="dynamic" visible="true"                    url="http://mapserver.ujep.cz/ArcGIS/rest/services/SZ_Cechy_Zlutice/bod/MapServer">                 <sublayer id="0" poupconfig="popups/PopUp_Obce.xml" />             </layer>


And here is the contents of the PopUp_Obce.xml file:

<?xml version="1.0" ?> <configuration>     <title>{OBJECTID}</title>          <fields>     <field name="OBJECTID" />         <field name="URL" visible="false"/>     </fields>     <medias>         <media type="image" caption="Photo" imagesource="{URL}" imagelink="{URL}"/>     </medias>  </configuration>  <!--     Pop-up configuration file for:     http://mapserver.ujep.cz/ArcGIS/rest/services/SZ_Cechy_Zlutice/bod/MapServer -->


I had to be zoom pretty far out for the popup to work though (that was strange).

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:

View solution in original post

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Jan,

   Sure here is what you need in the main config.xml

            <layer label="Obce" type="dynamic" visible="true"                    url="http://mapserver.ujep.cz/ArcGIS/rest/services/SZ_Cechy_Zlutice/bod/MapServer">                 <sublayer id="0" poupconfig="popups/PopUp_Obce.xml" />             </layer>


And here is the contents of the PopUp_Obce.xml file:

<?xml version="1.0" ?> <configuration>     <title>{OBJECTID}</title>          <fields>     <field name="OBJECTID" />         <field name="URL" visible="false"/>     </fields>     <medias>         <media type="image" caption="Photo" imagesource="{URL}" imagelink="{URL}"/>     </medias>  </configuration>  <!--     Pop-up configuration file for:     http://mapserver.ujep.cz/ArcGIS/rest/services/SZ_Cechy_Zlutice/bod/MapServer -->


I had to be zoom pretty far out for the popup to work though (that was strange).

Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos
JanPacina
Emerging Contributor
Hi Robert,
thank you for a promt answer.
At first it did not work, but the I found a type-mismatch in the code provided - instead of popupconfig there is only poupconfig. So far, I have no problems with the zoom out - it works even at the biggest scale.
Thank you very much for your time!!
Jan
0 Kudos
ValerieHanson
Occasional Contributor
Robert - this simple code for popup images is EXACTLY what i've been trying to find for the past 4 DAYS!  HALLELUJAH!   I've tried every arrangement i could think of from the Flexviewer 2.5 Resource page - http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Pop_up_configuration_files/01m30000002... Thank YOUUU!
0 Kudos