Select to view content in your preferred language

Make feature flash when popup is viewed

3883
20
Jump to solution
02-23-2012 08:51 AM
philippschnetzer
Frequent Contributor
You know what would be nice......if when you clicked on a feature that has popups enabled the feature was highlighted somehow on the map.  Even just a brief flash/halo that disappeared right away.  I have a specific case where this would really be helpful!

Thanks 🙂
Tags (2)
0 Kudos
20 Replies
RobertScheitlin__GISP
MVP Emeritus
Dilson,

   Sure. I just threw it into 2.5 of the viewer and it worked fine.
0 Kudos
DilsonKitoko
Emerging Contributor
Dilson,

   Sure. I just threw it into 2.5 of the viewer and it worked fine.


Good day Robert,

Thanks for the prompt reply.It's worked on 2.5. I just have two issues. When compiling there is a alert in line 69, about a problem with "import mx.controls.Alert;". Also I have problem when trying to resize the results box, it's fall to the bottom of the screen. Seems like i lost some control to resize resuts box.

Cheers,
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dilson,

    That is just a warning, that the import in not actually used in the code and could be removed.

I have problem when trying to resize the results box, it's fall to the  bottom of the screen. Seems like i lost some control to resize results  box
If you ever had the ability to resize your popups then you already had a customized popup skin, as resizing the popup is not a OTB feature.
0 Kudos
DilsonKitoko
Emerging Contributor
Dilson,

    That is just a warning, that the import in not actually used in the code and could be removed.

If you ever had the ability to resize your popups then you already had a customized popup skin, as resizing the popup is not a OTB feature.


Good day Robert,

Many thanks for your answer. I'm clarified.

Best Regards,
0 Kudos
DilsonKitoko
Emerging Contributor
All,

   So here is the full file with Mattias last addition and a new private var at the top where you can set the highlight color (if you don't want Red).


Hi Robert,

In the your customized file posted, the default highlight color ir deepskyblue 0x00bff3:

//************This is the higlight color that will be applied to the geometry when you click a feature***************//
   [bindable] private var highlightColor:uint = 0x00bff3;
//*******************************************************************************************************************//

I'm trying to change this color to any another but does not work. I change the color and the recompile, but the color is not being assigned. There is another place that should I change?

Thanks,
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dilson,

   Hmm... I really can not tell you where you are going wrong then. When I have a change to the highlightColor var it works fine.
0 Kudos
DilsonKitoko
Emerging Contributor
Dilson,

   Hmm... I really can not tell you where you are going wrong then. When I have a change to the highlightColor var it works fine.


Ok Robert, thanks anyway. I got his fixed. Its a strange behaviour, but i just reloaded the projec and it fixed the problem!
0 Kudos
DilsonKitoko
Emerging Contributor
Yes that would be nice, and it's doable.
You can get the PopUpRendererSkin.mxml from downloading the API and make some addition there to accomplish this.
My solution is probably not the best one, but it works for me. Basically I'm adding the feature to a new graphiclayer and put a glow filter on it.
Here's my customPopUpRendererSkin, my additions are commented so you can see what I've done and change to your own customizations. For example make it flash insted of beeing highlighted or whatever you want.
Copy the skin to for example src/com/esri/viewer/skins
and then point it out in the defaults.css, something like this:
esri|PopUpRenderer
{
 skin-class: ClassReference("com.esri.viewer.skins.customPopUpRendererSkin");
}

I'm still in version 2.4, and my customPopUpRendererSkin is based on the one from API 2.4. If you have 2.5, download that new skin and make the changes to that one...


Hi Mattias,

Can you please explain me how can I make it flash instead of just beeing highlighted?

Thanks in advance.
0 Kudos
DilsonKitoko
Emerging Contributor
All,

   So here is the full file with Mattias last addition and a new private var at the top where you can set the highlight color (if you don't want Red).


Hi Robert,

I've downloaded your attached PopRenderSkin and deployed on eSearch 2.5. It's working, but i was wondering if that's possible to make the feature flash, instead of a static glow. And how can I implement this

Many Thanks,
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dilson,

   If you want to do something different than what the provided code does than you will have to learn to program it yourself (all the programming is not always going to be done for you, unless you hire a programmer). Here is a thread where I show someone how to flash a feature graphic on the map:
http://forums.arcgis.com/threads/104402-GPS-coordinates-inputing-a-graphic
0 Kudos