Select to view content in your preferred language

PopUps

8887
56
04-18-2011 04:38 AM
philippschnetzer
Frequent Contributor
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
RobertScheitlin__GISP
MVP Emeritus
Phillip,

    I have not tested the old infoPopUp in 2.3, but I have been testing the new popUp and here is the configuration for the traffic cameras layer

<?xml version="1.0" ?>
<configuration>
    <title>{DESCRIPTION}</title>     
    <fields>
        <field name="DESCRIPTION"/>                
        <field name="ONLINE"/>       
        <field name="LAST_UPDATED"/>  
        <field name="URL"/>       
    </fields>
    <medias>
        <media chartfields="" type="image" caption="Latest Image {LAST_UPDATED} online: {ONLINE}" imagesource="{URL}" imagelink="{URL}"/>
    </medias> 
</configuration>

<!--
    Pop-up configuration file for:
    http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_PublicSafety_Louisville/MapServer/2
-->
0 Kudos
philippschnetzer
Frequent Contributor
I had the old InfoPupUp configured to accommodate for larger images and cannot seem to find the spot where I can change this to make the new PopUps larger in size to dynamically expand the canvas to fit in larger images...

I tried to make some changes in InfoPopup.mxml and HTMLPopup.mxml in the components folder but to no avail.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Phillip,

    You would have to modify the the skin for the PopUpRendererSkin which is part of the API and has a width 0f 270 and a maxHeight of 300, (needless to say a lot of work).  Maybe the API team will respond as to what is going wrong with the initial click.
0 Kudos
philippschnetzer
Frequent Contributor
Thanks, Robert.  As per usual you are extremely helpful!  I have never modified the API before and will take your word that it is 'a lot of work' 🙂

Hopefully the esri flex team will look into this....
0 Kudos
GerryWatson
Emerging Contributor
Hey Phil!

Robert, this is my first post on here, but I've been using some of your widgets since the fall when I started in on Flex and the Esri API. Thank you for all your work.

I'm facing a similar problem. Customizing the popups for the query widget beyond what they allow in the config is proving a real challenge.

I have tried extending the popupRenderer class and experimented a little. However dropping anything between the PopupRenderer tags throws errors that visual content is not allowed, or must implement IUIComponent, even after dropping specific UIComponent sub classes.

I've also tried to create a custom skin with PopupRenderer as the HostComponent and based on the PopupRendererSkin class. It wouldn't even allow me past the new file creation wizard - I suspect because both the skin and the renderer are compiled in the api swc and thus the wizard had no actual files to work with.

There has to be a way to customize this thing or expose the API and dig in. I'm willing to get my hands dirty with this if anyone has any leads I can follow.

Thanks again,

gerr
0 Kudos
GerryWatson
Emerging Contributor
Quick addition to that post. If you DL the raw Flex API 2.3 code (seperate from the viewer), unpack and follow this path: skins\src\com\esri\ags\skins

There is a copy of the PopupRendererSkin.mxml available - I haven't begun tearing it up yet but I'll share progress on this as I make it. Cheers

g
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Gerr,

   Well the only customizing of the PopUpInfo I have had time to do so far is remove the rectangle from around the media browser and some space optimization of the window. To begin customizing you need to create a PopUpRenderSkin by choosing a new MXML Skin and give it a package name, name, and host component of com.esri.ags.webmap.PopUpRenderer, Then un-check Create as copy of. Then you can open the arcgis_api_for_flex_2_3\ArcGIS_Flex\skins\src\com\esri\ags\skins\PopUpRendererSkin.mxml from your download of the 2.3 version of the API and copy and paste everything in that file.

That's how you start.
0 Kudos
GerryWatson
Emerging Contributor
I'll get busy with that and as mentioned, post to this thread as I progress. Phil - once I've got my head around it I can come down and show you what I did. After I've worked it out it sounds like modifying the thing for your purpose shouldn't be too bad.

Thanks Robert,

g
0 Kudos
DasaPaddock
Esri Regular Contributor
Gerr,

   Well the only customizing of the PopUpInfo I have had time to do so far is remove the rectangle from around the media browser and some space optimization of the window. To begin customizing you need to create a PopUpRenderSkin by choosing a new MXML Skin and give it a package name, name, and host component of com.esri.ags.webmap.PopUpRenderer, Then un-check Create as copy of. Then you can open the arcgis_api_for_flex_2_3\ArcGIS_Flex\skins\src\com\esri\ags\skins\PopUpRendererSkin.mxml from your download of the 2.3 version of the API and copy and paste everything in that file.

That's how you start.


You can get FlashBuilder to "Create as a copy of" by setting the source attachment path on the API swc. Under the "Flex Build Path" expand the API swc and double-click "Source attachment" and then browse to ".../ArcGIS_Flex/skins/src" after unziping the API download.
0 Kudos