PopUps

5325
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,

   Once you have made the popup changes discussed earlier than you go to the Project menu and choose "Export release build" and that will create  bin-release folder with all the compiled code can the contents of that folder is what you copy over to the web server.


Thanks I am feeling so much better about this - you have been so kind to provide me with detailed guidance. In reading the posts again it appears the file I need to make the change to however is the PopUpMediaBrowser. I tried applying the same logic you have guided me through but substituting MyPopUpMediaBrowser in place of the MyPopUpRendererSkin without success.
I am having difficulties with locating the Host component.

I managed somehow to get a copy of the PopUpMediaBrowserSkin.mxml into my project and so I moved it to the supportClasses folder.
I attempted to add it to the defaults.css however that produced a warning the
"Cannot resolve namespace qualified type "PopUpMediaBrowser' in CSS selector . . ."

I attempted to remove the code I added, resave the file but I'm still getting these warnings even thought the code it is referencing is not in my project?
I did a clean on the project and it appears that warning has cleared but I'm back to not having the PopUpMediaBroswer added to the css file. When I enter in the esri| and attempt to browse to the PopUpMediaBrowser it is not an option to select.

I'm thinking  I need to add a name space but not clear if that is correct or not. Still learning.
0 Kudos
TerryHiggins
New Contributor II
Thanks I am feeling so much better about this - you have been so kind to provide me with detailed guidance. In reading the posts again it appears the file I need to make the change to however is the PopUpMediaBrowser. I tried applying the same logic you have guided me through but substituting MyPopUpMediaBrowser in place of the MyPopUpRendererSkin without success.
I am having difficulties with locating the Host component.

I managed somehow to get a copy of the PopUpMediaBrowserSkin.mxml into my project and so I moved it to the supportClasses folder.
I attempted to add it to the defaults.css however that produced a warning the
"Cannot resolve namespace qualified type "PopUpMediaBrowser' in CSS selector . . ."

I attempted to remove the code I added, resave the file but I'm still getting these warnings even thought the code it is referencing is not in my project?
I did a clean on the project and it appears that warning has cleared but I'm back to not having the PopUpMediaBroswer added to the css file. When I enter in the esri| and attempt to browse to the PopUpMediaBrowser it is not an option to select.

I'm thinking  I need to add a name space but not clear if that is correct or not. Still learning.


Well reveiwing posts and the work I have completed so far to see if I could identify my own solution I did notice something else that I believe is not functioning correctly. When I use the control key and hover over the ersi|PopUpRenderer in the default.css file I receive a code navigation error - source could not be found for com.esri.ags.portal.PopUpRenderer in . . .[ATTACH=CONFIG]33565[/ATTACH]
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Terry,

   I think that is normal as the Flex API is NOT open source.
0 Kudos
TerryHiggins
New Contributor II
Terry,

   I think that is normal as the Flex API is NOT open source.


Evidently I have still done something incorrectly or misunderstood something along the way as the changes I have made do not reflect within my map. I thought the issue I noted previously was the cause. Any additional input to assist me in this would be greatly appreciated.
Thanks
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Terry,

   It is pretty hard for me to know where things have went wrong for you. The only thing I can do is suggest you review each step and see if you missed something. You need to keep in mind that flex is a CaSe sensitive language so if your paths are off even by the case of one letter, that is no good.
0 Kudos
TerryHiggins
New Contributor II
Terry,

   It is pretty hard for me to know where things have went wrong for you. The only thing I can do is suggest you review each step and see if you missed something. You need to keep in mind that flex is a CaSe sensitive language so if your paths are off even by the case of one letter, that is no good.


Thanks Robert - I do realize the importance of case and will go back through every step and try to identify my mistakes. Thanks for all your assistance in this.
0 Kudos
TerryHiggins
New Contributor II
Thanks Robert - I do realize the importance of case and will go back through every step and try to identify my mistakes. Thanks for all your assistance in this.


Robert - I went back through my project focusing only on the MyPopupRendererSkin.mxml and realized that the chnages I make to this are being reflected in my map. When I edit this section -
<supportClasses:PopUpMediaBrowser id="mediaBrowser"
                                          height="270"
      width="100%"
                                          skinClass="com.esri.ags.skins.supportClasses.PopUpMediaBrowserSkin"/>

In regards to the height property it changes the height of the container that my image is within. So now I am wondering if the PopUpMediaBrowserSkin is actually the skin that affects the white border that surrounds my image, as it apears any changes I make to it are not reflected.
Can you confirm that is the skin that affects the border that surrounds an image that appears when you click on a feature? If that is the skin do I need to also change the line shown about to reflect the new name of the copied skin or does this line in the PopUpMediaBrowser remain unchanged?
Thanks again for all your time and assistance on this.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Terry,

   For removing the border from the image you need to foloow this thread:

http://forums.arcgis.com/threads/38375-Change-media-container-size-in-Pop-Up-Window
0 Kudos
TerryHiggins
New Contributor II
Terry,

   For removing the border from the image you need to foloow this thread:

http://forums.arcgis.com/threads/38375-Change-media-container-size-in-Pop-Up-Window


I have tried to follow that link - when I run the project in debug at the point when I click on the feature to obtain the popup I receive a type error - error #1009 Cannot access a property or method of a null object reference.
The line of code this error refers to reads:
var attributes:Object = hostComponent.attributes;

any suggestion on how to resolve this?
Terry
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
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.
0 Kudos