AnsweredAssumed Answered

API 2.3 InfoWindowRenderer,

Question asked by geonetadmin on Apr 15, 2011
Latest reply on Apr 15, 2011 by odoe
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/infowindow.html&com/esri/ags/components/supportClasses/class-list.html

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.

Attachments

Outcomes