Select to view content in your preferred language

view multiple pictures

5162
42
03-17-2011 06:03 AM
RandellMcGlynn
Emerging Contributor
Hi, I'm trying to create a web app with the flex viewer, but I need to show multiple pictures for one point. I've used the enhanced identify widget, to show one picture, but is there a way to view more than one (For this project, I only need to show 2 images, but it would be nice to show more than 2). I don't have to use the identify widget, I would just prefer it, but if there is no other way I would be alright with that.

Thanks in advance.
Tags (2)
0 Kudos
42 Replies
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Which version of the Flex Viewer are you using? and what Adobe Flex SDK are you using?

and a couple warnings:
(for every widget xml config file )
No grammar constraints (DTD or XML schema) detected for the document.
These WARNINGS will probably never go away as I don't foresee esri producing DTD or XML schema files for all their XML files.
0 Kudos
RhettZufelt
MVP Notable Contributor
Figured as much for the warnings.  It is really the missing info error and compile warnings that concern me.

I am using the latest Flexviewer 2.4 that I downloaded one week ago.

Using the FlashBuilder4.5 (trial version as I am awaiting my copy with snail mail) and the SDK says Flex 4.5.1.

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   The Flex Viewer is built against Adobe Flex SDK 4.1 You should go get the 4.1 SDK and add it to your Flash Builder workspace. If you go to the project menu and properties and then choose Flex Compiler and click the Configure Flex SDK... link, then Find and download other versions of Flex SDK, that should get you going.
0 Kudos
RhettZufelt
MVP Notable Contributor
Robert,

Thanks again for the help and the amazingly quick response.

that seemed to fix the compile warnings,  but I still seem to be missing the skin state.

Any other ideas/suggestions?

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Try adding this state to the states parent element then:

<s:State name="queryAttachmentInfosWithList" stateGroups="queryAttachmentInfosGroup"/>
0 Kudos
RhettZufelt
MVP Notable Contributor
That did it.  Now all I have is the schema warnings so I should be good to go.

Thanks again for the (rapid) help,

Rhett
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   That is easily disabled as well by going to Window Menu and Preferences > XML > XML Files > Validation > Indicate when no grammar is specified: Ignore.
0 Kudos
RhettZufelt
MVP Notable Contributor
Robert,

Noticed that I had ended up with the mxml and swf files together in my source directory.  Once I removed all the swf's and re-compiled, this setting starting having an affect.

I set a max/min width field, and the trick was to make the MaxDisplayedLines= to a number larger than ever needed.  Now my text wraps within the box instead of making the box huge.

The one issue I have now is that the preview image (using the multiimagelink) is no longer in the middle of the popup window, but is off to the left side.  I tried to figure out how/where to make this change so that it centers it inside the window, regardless of the window size, but have not been successfull.

Was hoping you could point me towards the right file/code block as where this is handled so I can try to manipulate to fit.

Thanks again for any insight,

Rhett

Rhett,

   I don't have any experience with that scenario, but I would look at the InfoContentItemRenderer.mxml and this label:

<s:Label id="value"
             width="100%"
             maxDisplayedLines="-1"/>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Sure just adjust the cWidth of the MultiImageControl
<InfoTemplates:MutiImageControl id="mInfoImageC" width="100%" visible="false" includeInLayout="false" cWidth="250"/>
0 Kudos
RhettZufelt
MVP Notable Contributor
Thanks again Robert.

That allows me to change the size of the preview image, but can't figure out how to center it.
However, the multi image control works like a champ, and that is the important part.  Finally have a way to show more than one photo associated with my features.  Too bad we can't hyperlink off of relates, then this would be simple.

One other thing I have noticed though, is that not ALL of my features have photos.  If I click on the features that have photos, everything is working correctly.  However, if I start clicking on features that do NOT have photos, the titlefield value does not change.  So, no matter how many non-photo features I click on, it always gives me the title of the last feature I clicked on that has photos.

the other fields that I have change to the proper info, even if I use the same field in the <fields> tag as I do the <titlefield> tag.  The fields data updates correctly every time, the titlefield only updates if photos are present.

I have incorporated this "fix" http://jeffgermain.wordpress.com/2011/05/05/bug-in-arcgis-api-for-flex-infowindow-workaround/ as it seemed to be similar if not the same issue, but did not resolve it.

Any idea as to what is going on here and how to fix it?

Thanks again,

R_

Rhett,

   Sure just adjust the cWidth of the MultiImageControl
<InfoTemplates:MutiImageControl id="mInfoImageC" width="100%" visible="false" includeInLayout="false" cWidth="250"/>
0 Kudos