InfoWindowRenderer re-drawing custom symbol?

2752
12
Jump to solution
04-24-2012 06:45 PM
MattStrum
New Contributor
(EDIT: FYI using 3.0 preview)

I am using a custom Symbol in a GraphicsLayer with a infoWindowRenderer defined which does nothing but display some static stuff (from the InfoWindow sample) but I'm seeing some strange results.  When I click on a symbol, it looks like either the first symbol in the GraphicsLayer or perhaps all of the symbols are getting re-drawn under where the infoWindow appears.  Here is a picture before and after clicking on a symbol:

[ATTACH=CONFIG]13790[/ATTACH]

[ATTACH=CONFIG]13791[/ATTACH]

When I click the 'x' on the infoWindow, the extra added symbol(s) goes away.

Here is what my graphicsLayer definition looks like:

<esri:GraphicsLayer id="markersLayer" infoWindowRenderer="com.flack.geni.display.mapping.mapproviders.esriprovider.testInfoWindow" />


I'm not doing much with the infoWindowRenderer, here's the code for that:

<?xml version="1.0" encoding="utf-8"?> <esri:LabelDataRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"      xmlns:s="library://ns.adobe.com/flex/spark"      xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:esri="http://www.esri.com/2008/ags">  <esri:label>test</esri:label>  <s:BorderContainer backgroundColor="white"         borderColor="black"         color="green"         cornerRadius="5"         minHeight="0"         minWidth="0">   <s:layout>    <s:VerticalLayout paddingBottom="5"          paddingLeft="5"          paddingRight="5"          paddingTop="5"/>   </s:layout>   <s:Label text="Sex ratio"/>   <s:Label text="Divorce rate:" toolTip="Divorce rate is the number of divorces per 1000 people."/>  </s:BorderContainer> </esri:LabelDataRenderer>


Any insight would be greatly appreciated 🙂
0 Kudos
12 Replies
by Anonymous User
Not applicable
Original User: mstrum

Are you having any issues with your symbol when you pan or zoom?

Can you try adding this to your symbol code:

override public function clear(sprite:Sprite):void
{
    removeAllChildren(sprite);
    sprite.graphics.clear();
    sprite.x = 0;
    sprite.y = 0;
    sprite.filters = [];
    sprite.buttonMode = false;
}


override public function destroy(sprite:Sprite):void
{
    clear();
}


After adding that code, I didn't need to have "defaultGraphicsLayer.visible = false"

There weren't any other effects I can see though. Quick question, it seems that the markers only occur once on the map and don't get copied into areas where the map repeats itself. Is there a setting that needs to be set to support that or some code that needs to be added into the symbol, graphic or graphicsLayer?
0 Kudos
by Anonymous User
Not applicable
Original User: dpaddock

I'm glad to hear that resolved the original issue.

It's currently up to the symbol code to support wraparound mode. This may be changed at the 3.0 final release.
0 Kudos
MattStrum
New Contributor
I'm glad to hear that resolved the original issue.

It's currently up to the symbol code to support wraparound mode. This may be changed at the 3.0 final release.


Any documentation on how to support wraparound mode?
0 Kudos