I am new to ArcGIS viewer for Flex 3.0. I have read many posts on this forum but still having difficulty getting my photo popups to work. Short Description of my env. ArcGIS 10.0 Flex application builder 3.0 I managed to get a number of widgets working with no problem. I am having a problem getting a point service for my photos to popup a photo on clicking on the point. I have a point layer in SDE with a field called path. This field contains the image file name. I have tried a number of different things that I read on the forum but could not make it work. I do not want to waste any more time on trying to get it working. I need someone with experience to give me some pointers to get this working. Could someone please be so kind as to help me with my questions? 1. What should the field in my photo point dataset be populated with? (\\photos\test.jpg or http://servername/photos/test.jpg or just test.jpg ) I have a point layer with about 10000 photo points in it. The photo???s sits on the same server as flex and ArcGIS Server. 2. Should this layer be published as a dynamic or feature service? (I have published mine as a feature service) 3. I see my points in the viewer and can select them; I even have the cluster function working. On clicking on the photo icon it pops up with the field attributes but no photo. I am doing something wrong in my lack of knowledge. (Please see attached *.jpg ) Config.xml <widget url="widgets/InfoTemplates/AttRelateInfoWinWidget.swf" config="widgets/InfoTemplates/AttRelateInfoWinWidget_9.xml" label="AttRelateInfoWin" icon="assets/images/i_camera.png"/> <layer type="feature" label="Structure Photos" url="http://TGIS01/ArcGIS/rest/services/Channel_photos/MapServer/0" popupconfig="popups/PopUp_3.xml" mode="onDemand" visible="true"> <clustering> <clustersymbol type="flare"/> </clustering> </layer> AttRelateInfoWinWidget_9.xml <?xml version="1.0" ?> <configuration> <fields>Object_id,path</fields> <titlefield>Photo</titlefield> <links> <linkfield icon_or_text_or_img="img" icon="" linkalias="" linkprefix="http://TGIS01/Photos/" linksuffix=".jpg">path</linkfield> </links> <layername>Structure Photos</layername> <datefields/> <zoomscale>5000</zoomscale> <csvseparator>,</csvseparator> <labels> <csvdefaultname>Related Records</csvdefaultname> <exportbtnlabel>Export...</exportbtnlabel> <export2csvoptionlabel>Export to CSV...</export2csvoptionlabel> <export2txtoptionlabel>Export to Txt...</export2txtoptionlabel> </labels> </configuration>
PopUp_3.xml <?xml version="1.0" ?> <configuration> <title>{OBJECTID}</title> <description><![CDATA[{PATH} {TIME} {LATITUDE} {LONGITUDE} {ALTITUDE}]]></description> </configuration> I created a virtual dir in IIS that points to the photo folder but was not sure what path to put in my data set attribute field (http://servername/Photo or do I just share the folder and populate the field with \\servername\photo ?) As you van see I am a bit confused.
4. The last question. Should I be using the .swf and .xml files in AttRelateInfoWin widget folder or InfoTemplates widget folder? Hope someone can give me some advice
1. What should the field in my photo point dataset be populated with? (\\photos\test.jpg or http://servername/photos/test.jpg or just test.jpg ) A: I prefer to use just the image file name (test.jpg) and then put the REAL url in the prefix i.e. http://servername/photos/ UNC paths like \\photos\test.jpg should not be used in web applications. You do NOT need the .jpg in the suffix as you already have that in the actual field data.
2. Should this layer be published as a dynamic or feature service? A: A feature layer type like you have is right. You will not need a Feature Service unless you want to allow editing.
3. I see my points in the viewer and can select them; I even have the cluster function working. On clicking on the photo icon it pops up with the field attributes but no photo. Comment: I personally have not used a clusterer with the Attachment Info Relate Widget.
4. The last question. Should I be using the .swf and .xml files in AttRelateInfoWin widget folder or InfoTemplates widget folder? A: The InfoTemplates folder
!!! Remove the popupconfig="popups/PopUp_3.xml" from your layer you can not have two popups defined for the same layer.
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:
1. What should the field in my photo point dataset be populated with? (\\photos\test.jpg or http://servername/photos/test.jpg or just test.jpg ) A: I prefer to use just the image file name (test.jpg) and then put the REAL url in the prefix i.e. http://servername/photos/ UNC paths like \\photos\test.jpg should not be used in web applications. You do NOT need the .jpg in the suffix as you already have that in the actual field data.
2. Should this layer be published as a dynamic or feature service? A: A feature layer type like you have is right. You will not need a Feature Service unless you want to allow editing.
3. I see my points in the viewer and can select them; I even have the cluster function working. On clicking on the photo icon it pops up with the field attributes but no photo. Comment: I personally have not used a clusterer with the Attachment Info Relate Widget.
4. The last question. Should I be using the .swf and .xml files in AttRelateInfoWin widget folder or InfoTemplates widget folder? A: The InfoTemplates folder
!!! Remove the popupconfig="popups/PopUp_3.xml" from your layer you can not have two popups defined for the same layer.
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: