Select to view content in your preferred language

Images do not display in identify widget pop up

1861
2
Jump to solution
10-23-2012 09:58 PM
wilfredwaters
Regular Contributor
Hi all,

I am using the identify widget v 3.0.1. I have successfully set it up to identify a point dataset, displaying some items only in the pop up. I now want to display photos in the pop up. It does not, however, display such images even when I have, to my knowledge, been setting up the config file correctly (see below). Any help much appreciated.

Yes, the map service is set up with a field called 'photo' containing the file name and extension of the photos so it matches up with the prefix in the syntax of the identify widget below. I checked that this field is accessible to the widget by adding it into the list to be displayed when one uses the widget (see bolded syntax below). Strangely, this then caused the pop up to behave as though it were displaying the photos, but only a frame with a broken image symbol in the middle appeared. Also, the red x image in the identify tool results was also replaced with a broken image symbol.

<?xml version="1.0" ?> <configuration>     <betareturngeometryfix>false</betareturngeometryfix>     <identifylayeroption>visible</identifylayeroption>     <identifytolerance>5</identifytolerance>     <defaultzoomscale>5000</defaultzoomscale>     <keepidentifyactive>true</keepidentifyactive>     <returngeometryforzoom>true</returngeometryforzoom>     <enablelineselect>true</enablelineselect>     <enableextentselect>true</enableextentselect>     <enablepolyselect>true</enablepolyselect>     <enablemouseovergraphicsinfo>true</enablemouseovergraphicsinfo>     <enablemouseoverrecordinfo>false</enablemouseoverrecordinfo>     <usemaptime>false</usemaptime>     <infoautoclosemilliseconds>2000</infoautoclosemilliseconds><!-- 2 seconds -->     <autoactivatedtool>mappoint</autoactivatedtool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->     <excludebasemaps>true</excludebasemaps>     <disablepopuplinks>false</disablepopuplinks>     <labels>         <zoom2message>Click to Zoom to Point</zoom2message>         <identifylabel>Identify</identifylabel>         <resultslabel>Results</resultslabel>         <descriptionlabel>Use the identify tool to identify features on the map:</descriptionlabel>         <pointlabel>Identify by Point</pointlabel>         <linelabel>Identify by Polyline</linelabel>         <rectlabel>Identify by Rectangle</rectlabel>         <polylabel>Identify by Polygon</polylabel>         <clearlabel>Clear</clearlabel>         <loadinglabel>Loading...</loadinglabel>         <removeresultmessage>Remove Result</removeresultmessage>         <idfrom>Identify From</idfrom>         <noresultsfoundlabel>No Results Found</noresultsfoundlabel>         <resultsfoundlabel>Results Found</resultsfoundlabel>     </labels>     <useproxy><!-- Enter the label of the MapService from the main config.xml -->         <!--<proxymapservice label="Imagery" />         <proxymapservice label="Streets" />-->     </useproxy>     <layers onlythese="true">         <layer>             <name>offices</name>             <fields>                 <field name="photo" alias="photo" />                                                                                        <field name="Address" alias="Address" />                 <field name="City" alias="City" popuponly="true"/>                 <field name="State" alias="State" popuponly="true"/>                 <field name="Postcode" alias="Postcode"/>             </fields>             <links>                 <link includeinresults="true" field="photo" alias="photo" tooltip="hi this is a tooltip">                     <linkprefix>https://example.example.com/example/example/example/Documents/photos/test</linkprefix>                     <linksuffix></linksuffix>                     <iconfield></iconfield>                     <iconprefix>https://example.example.com/example/example/example/assets/images/edit_markertool.png</iconprefix>                     <iconsuffix></iconsuffix>                 </link>             </links>             <zoomscale>15000</zoomscale>             <forcescale>true</forcescale>         </layer>         <layer>             <name>QLD rail</name>             <fields>                 <field name="FNAME" alias="Name" />                 <field name="WIDTH" alias="Gauge" popuponly="true"/>                 <field name="ELECTRIFIE" alias="Electrified?" popuponly="true"/>                 <field name="OP_STATUS" alias="Status"/>                 <field name="ESRIdate" alias="Date"/>popuponly="true" dateformat="YYYY/MM/DD"/>             </fields>             <links>                 <link includeinresults="false" field="" alias="" tooltip="">                     <linkprefix></linkprefix>                     <linksuffix></linksuffix>                     <iconfield></iconfield>                     <iconprefix></iconprefix>                     <iconsuffix></iconsuffix>                 </link>             </links>             <zoomscale>15000</zoomscale>             <forcescale>true</forcescale>         </layer>     </layers>          <symbols>         <simplefillsymbol color="0x448ccb" alpha="0.4" style="solid">             <outline color="0x448ccb" alpha="0.8" width="2"/>         </simplefillsymbol>         <simplemarkersymbol style="circle" size="12" color="0x448ccb" alpha="0.8" xoffset="0" yoffset="0" angle="0">             <outline style="solid" color="0xffffff" alpha="0.8" width="1"/>         </simplemarkersymbol>         <picturemarkersymbol url="assets/images/i_info.png" height="30" width="30" xoffset="0" yoffset="0" />         <simplelinesymbol color="0x448ccb" alpha="0.8" width="2"/>     </symbols> </configuration>
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AnthonyGiles
Honored Contributor
Wilfred,

Have you tried accessing one of your images by just typing in the address in a browser. Your problem sounds like the path to the image is not correct or you do not have access to the image.

Regards

Anthony

View solution in original post

0 Kudos
2 Replies
AnthonyGiles
Honored Contributor
Wilfred,

Have you tried accessing one of your images by just typing in the address in a browser. Your problem sounds like the path to the image is not correct or you do not have access to the image.

Regards

Anthony
0 Kudos
wilfredwaters
Regular Contributor
Wilfred,

Have you tried accessing one of your images by just typing in the address in a browser. Your problem sounds like the path to the image is not correct or you do not have access to the image.

Regards

Anthony


Hi Anthony,

Thanks for your interest. I checked this by clicking the frame with the broken link symbol. It then showed the path that it was trying to retrieve the image from. I found that it was pointing to the wrong folder on the web server. I simply transferred the photos to the folder it was in fact pointing to, and voi la, the photos now come up in the pop up. I then commented out the following:

<name>offices</name>
  <fields>
  <!--field name="photo" alias="photo" /-->


and it still works.

I'll put this down to being confused as I'm new to developing Flex apps.



Wil
0 Kudos