Select to view content in your preferred language

how to use AttRelateInfoWinWidget

931
4
11-17-2011 11:52 PM
HaniuHokkaido
Deactivated User
Hi,
I am having problems in using this widget. I got this working but it doesnt look like this sample : http://gis.calhouncounty.org/FlexViewer2.4/index.html?config=config-infoimage.xml . Here, each time I click on the poi (point of interest), the picture will appear.

The attachment and relate is working fine. I just want to see the picture when i click the poi...

Thanks

[I am using FlexViewer 2.4, ArcGIS Server 10, and Flex SDK 4.1]

Here is my code :

IWT.XML

<?xml version="1.0" ?>
<configuration>
    <fields>province</fields>
    <titlefield>country</titlefield>
    <links>
     <linkfield icon_or_text_or_img="img" icon="http://localhost" linkalias="" linkprefix="" linksuffix="">http://localhost/obel.jpg</linkfield>
    </links>
    <layername>ProvCountry</layername>
    <datefields></datefields> <!-- field in milliseconds -->
    <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>


Config.xml

   <layer label="ProvCountry" type="feature" visible="false"
             info="widgets/InfoTemplates/AttRelateInfoWinWidget.swf"
                infoconfig="widgets/InfoTemplates/IWT.xml"
                url="http://localhost/ArcGIS/rest/services/ProvCountry/FeatureServer/0"/>
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Haniu,

   Some when you type "http://localhost/obel.jpgin your web browsers address bar you see that image right. Using icon="http://localhost" is not doing anything for you. The icon would normally look like this: icon="assets/images/i_camera.png" (an image from your viewers assets folder). Look at the IWT_Cameras.xml for working examples.
0 Kudos
HaniuHokkaido
Deactivated User
Hi Robert,

Thanks for the reply. Yes, i should put  " icon="assets/images/i_camera.png" ". thanks.

But what i want is how can i have a picture to show up each time i click on each POI.. ? Like the attachment here. In your sample, each time I click on a camera icon / horse icon, a picture will appear. How can you do this ? What do I have to set ? Do I have to have "URL" field in my spatial table ?

Thanks for the help

🙂
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Haniu,

  
Do I have to have "URL" field in my spatial table ?
Yes. If you look in the the data that came with the widget there are examples (i.e. IWT_Cameras.xml and IWT_Places.xml
0 Kudos
HaniuHokkaido
Deactivated User
Aha.. thanks Rob.

😄
0 Kudos