From: Edwin C. <com...@gm...> - 2009-10-07 08:10:59
|
Hi Rafael, I saw you added a class VectorFeatureAttributes. I suppose the reason to not work with a JSObject is to limit the type of attributes that can be set. I am not sure, but it seems reasonable that a VectorFeature does not have JavaScript function or object as attribute. However, it seems to me that this can be approached more generically with an Attributes class, that allows for setting and getting arbitrary properties that are more constrained than JSObject. Objects that allow setting arbitrary attributes (not defined by any API) that are not similarly constrained should use JSObject in my opinion. With a generic Attributes class we get the least duplication of JSObject functionality (that is getPropertyXxx/setPropertyXxx). The Option objects for example set specific options, while the attributes class would provide getters and setters that are as generic as those on JSObject. What do you (and other developers) think about refactoring VectorFeatureAttributes to org.gwtopenmaps.openlayers.util.Attributes? To me, there seems to be nothing in VectorFeatureAttributes that is specific to a VectorFeature. While we are still pre 0.5 I think it is still a good option to refactor. If you agree I will go forward with the refactoring. Greetings, Edwin |