PopUps

5335
56
04-18-2011 04:38 AM
philippschnetzer
Occasional Contributor III
I have moved over my 2.2 app to 2.3.  I am using the QueryTool to display some traffic cameras and other static images and simply copied over the entire code from the 2.2 query tool and pasted it into the 2.3 version.  I did this because I want the query tool to still utilize the old InfoPopUp because I have that specifically configured.  Things work as expected - except that when the query is run the first time and a resulting icon is clicked on the map nothing shows in the InfoPopUp - but as soon you click on another point everything works as it did in 2.2.  There is some sort of conflict in there for the first time a point is clicked.  Should I just try to drop the InfoPopUp and try to make this work with the new popup or is this perhaps just a simple line of code missing preventing the first click from showing any results?

Thank you for any help!
Tags (2)
0 Kudos
56 Replies
TerryHiggins
New Contributor II
Terry,

   What is your PopUpMediaBrowserSkin.mxml called and where did you place it? Your MyPopUpRenderSkin.mxml needs to point to your PopUpMediaBrowserSkin.mxml using the skinClass attribute.


My PopUpMediaBrowserSkin.mxml is named MyPopUpMediaBrowserSkin.mxml and it is located in the com.esri.viewer.skins.supportClasses package.

When you state "your MyPopUpRendererSkin.mxml" needs to point to your PopUpMediaBrowserSkin.mxml I presume the skinClass attribute is within the fx Declarations? under

<supportClasses:PopUpMediaBrowser id="mediaBrowser"
height="270"
width="100%"
skinClass="com.esri.viewer.skins.supportClasses.MyPopUpMediaBrowser"/>

I also added the import in the fx Script block
import com.esri.viewer.skins.supporClasses.MyPopUpMediaBrowserSkin;

And in the default.css I entered
esri|PopUpMediaBrowser
{
skinClass:ClassReference("com.esri.viewer.skins.supportClasses.MyPopUpMediaBrowser");
}

esri|PopUpRenderer
{
skinClass:ClassReference("com.esri.viewer.skins.MyPopupRendererSkin");
}

I really thought I had thoroughly read all the posts and suggestions and applied them correctly. I appoligize for being so dense on this - I am really trying to learn.

I did notice that I named my copy of the PopUpRendererSkin - MyPopupRendererSkin - the fact I didn't capitalize the u in Popup wouldn't be causing this issue would it? Since this is my copy I presume it basically could be named anything.

The Host Component was left alone with the fx:Metadata tag to the
[HostComponent("com.esri.ags.portal.PopUpRenderer")]

Terry
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Terry,

  Hmm...
I also added the import in the fx Script block
import com.esri.viewer.skins.supporClasses.MyPopUpMediaBrowserSkin;
You can undue that.
You are not replacing the actual PopUpMediaBrowser component. You are just updating the skinClass.

And in the default.css I entered
esri|PopUpMediaBrowser
{
skinClass:ClassReference("com.esri.viewer.skins.supportClasses.MyPopUpMediaBrowser");
}
You can undue that as well as they way the component knows to use your customized skin is through you setting the skinClass attribute.

It looks like your issue is actually in this code:

<supportClasses:PopUpMediaBrowser id="mediaBrowser"
height="270"
width="100%"
skinClass="com.esri.viewer.skins.supportClasses.MyPopUpMediaBrowser"/>


that should be:

<supportClasses:PopUpMediaBrowser id="mediaBrowser"
height="270"
width="100%"
skinClass="com.esri.viewer.skins.supportClasses.MyPopUpMediaBrowserSkin"/>
0 Kudos
TerryHiggins
New Contributor II
Terry,

  Hmm...  You can undue that.
You are not replacing the actual PopUpMediaBrowser component. You are just updating the skinClass.

You can undue that as well as they way the component knows to use your customized skin is through you setting the skinClass attribute.

It looks like your issue is actually in this code:

<supportClasses:PopUpMediaBrowser id="mediaBrowser"
height="270"
width="100%"
skinClass="com.esri.viewer.skins.supportClasses.MyPopUpMediaBrowser"/>


that should be:

<supportClasses:PopUpMediaBrowser id="mediaBrowser"
height="270"
width="100%"
skinClass="com.esri.viewer.skins.supportClasses.MyPopUpMediaBrowserSkin"/>


Robert,
Actually I had this code as you described previously with the same end result. I went in and removed the items you stated were not required and set the code back as you described. I have the same result occurs as before the changes to the rect have no affect on my results. This is so baffling to me.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Terry,

   I am not real sure where you are going wrong then. I have done these steps (even naming my "MyPopupRendererSkin.mxml" just like yours) and I have no problem seeing the changes, to include the rectangle being removed. Here is my whole MyPopUpMediaBrowserSkin.mxml
0 Kudos
TerryHiggins
New Contributor II
Terry,

   I am not real sure where you are going wrong then. I have done these steps (even naming my "MyPopupRendererSkin.mxml" just like yours) and I have no problem seeing the changes, to include the rectangle being removed. Here is my whole MyPopUpMediaBrowserSkin.mxml


Thank you - thank you - thank you
I finally have this working. Without your providing me the file you did I seriously doubt I would have found the issue. The problem was in line 50 (note this is not a line that I altered previously) - in my code it was:
private static const symbols:Array = [ "borderRecSymbol" ];

Your code:
private static const symbols:Array = [  ];

I can't express enough how much I appreciate your kindness and willingness to assist me in this. You have been extrememly helpful. I only hope some day I will be able to gain enough knowledge to assist someone else as you have assisted me.

Now to deploy this to my server I believe you provided some insight on that process - I will have to review the posting.
0 Kudos
TerryHiggins
New Contributor II
I am trying to recreate this process stpe by step however now when I setup my FB I don't have a default css file. Any suggestions on where to identify why this would not be created? I took the ArcGIS Viewer for flex application and used the export option to export my file to my local PC and then brought that into the FB but no default css file shows up in the default src folder.

Thanks in advance,
Terry
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Terry,

   You can not take the exported project files and re-import them into Flash Builder as a project (because once exported as a release build you are not dealing with the source code anymore, you are now dealing with a compiled viewer).
0 Kudos