Select to view content in your preferred language

Confused about pop-up windows

1025
4
04-25-2011 10:47 AM
JustinRiggs
Emerging Contributor
Hi,

I am trying to complete a project where the client wants the following:

1) A partial list of the attributes of a structure
2) A picture of the structure
3) A link to one or more documents that relate to the structure

I know that #1 and #2 are possible using the new pop-up windows (although I am seriously confused about how to implement #2), but can #3 be achieved? The client has up to 10 files per structure, and would like to be able to link to each one individually. I have no idea how to go about this...

Thanks for the help...

Justin
Tags (2)
0 Kudos
4 Replies
JonFisher
Emerging Contributor
1. is set up with the <fields> tag in the xml file for the popup
2. To do this you need the <medias> tag and reference an attribute set up already in the fields section (but not set to visible), e.g.:
<medias>
        <media chartfields="" type="image" caption="" imagesource="{HYPERLINK}" imagelink="{HYPERLINK}"/>
    </medias>

3. Any fields listed in the <fields> sections that have valid hyperlinks will automatically be clickable. If you wanted the links to be formatted differently you could use the <description> tag, and again need to set up any link fields you reference in the <fields> section.
0 Kudos
JustinRiggs
Emerging Contributor
Hi Jon,

Thanks for your reply. I'm still confused about #2. I don't author my own .mxd's, so I need to be able to guide my coworkers on how to do their part.

If I'm understanding correctly they need to create a new field in the .mxd called "HYPERLINK". In that field they need to define a path to where the image is stored on the server. Then I do what you said and the picture will appear.

I know that's probably pretty garbled on my part. Just goes to show how confused I am. Sorry 'bout that.
0 Kudos
JonFisher
Emerging Contributor
Hi Jon,

Thanks for your reply. I'm still confused about #2. I don't author my own .mxd's, so I need to be able to guide my coworkers on how to do their part.

If I'm understanding correctly they need to create a new field in the .mxd called "HYPERLINK". In that field they need to define a path to where the image is stored on the server. Then I do what you said and the picture will appear.

I know that's probably pretty garbled on my part. Just goes to show how confused I am. Sorry 'bout that.


That's correct. They technically need to create a new field in the feature class (although they can do that via the mxd). Also, they will not be able to do so while the map service(s) pointing at that feature class is running as it's a schema change and the services lock the schema. So, the workflow is:
1. Make sure all images are online somewhere and you have the URLs handy
2. stop any map services pointing to that feature class
3. add the new field(s)
4. you can then populate them with the links to the images (or you can do that later in an edit session, which doesn't require stopping services
5. start the map service(s) again.
6. Now that a field with a link to the images exists, you can update the popup xml, clear your browser cache, and when you reload the Flex app it should work
0 Kudos
JustinRiggs
Emerging Contributor
Jon,

Thanks for the detailed instructions. I'll give this a try and update with any thoughts/questions later on.
0 Kudos