Select to view content in your preferred language

API 2.3 InfoWindowRenderer,

1921
2
04-15-2011 01:51 PM
by Anonymous User
Not applicable
Original User: odoe

So, API 2.3 growing pains with my InfoWindows.
InfoWindow seems to have gotten an overhaul and been sparked with 2.3, which is awesome.
http://help.arcgis.com/en/webapi/flex/apiref/index.html?com/esri/ags/components/supportClasses/infow...

Up to this point, the way I have handled InfoWindows was to create a class like this
public class FeatureInfoWindowRenderer extends SkinnableComponent implements IGraphicRenderer


I set the InfoWindowRenderer as follows.
featureLayer.infoWindowRenderer = new ClassFactory(FeatureInfoWindowRenderer);


Then to make it play nice with the InfoWindow, I added my own data getter/setters for the data object and set it in my graphic setter.
public function set graphic(value:Graphic):void
{
 data = value.attributes;
}


My InfoWindows can get a little complex, so I actually needed the skinnable comp to add my own custom content that could also be skinned. I set my styles via CSS and the world was a happy place.

Since InfoWindow was updated with Spark and now has a Skin, I figured it should impact what I'm doing too much, but I have attached before and after images of the devastation to my InfoWindow.

So I figured I'd start fresh, removed all references to ESRI in my CSS and followed one ofthe new 2.3 samples which uses a LabelDataRenderer.
So I made a new Renderer
public class MyFeatureInfoWindowRenderer extends LabelDataRenderer implements IGraphicRenderer


And set the data via the graphic setter as before, as well the label in LabelDataRenderer and what I get is shown in the 3rd image I attached(oops.jpg).

So at this point, I'm just confused.
Should I be extending the InfoWindowSkin to do this?

I'll keep experimenting, but the samples are a little simple and none show if I need to do something special now when using the ClassFactory method of setting the InfoWindow.

Thanks.
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: odoe

Realized I no longer have to set the data in graphic setter, but still I use graphic for other stuff.
0 Kudos
ReneRubalcava
Esri Frequent Contributor
Scratch this. I think it has to do with SVN failing to delete 2.2 from a library project. 2.2 refs still floating around. Can verify Monday. Thanks. My bad.
0 Kudos