From: Edwin C. <com...@gm...> - 2010-02-12 00:46:52
|
hi all, I moved the redraw function from Layer to HTTPRequestLayer. Are there any objections to that? The redraw function is a function of HTTPRequestLayer and subclasses in OpenLayers. I guess it got moved to Layer for convenience, but when you have Layer and want to call redraw you should actually first check if it is a Layer on which redraw can be called. For example: WMS wmsLayer; String layerClassName = Layer.narrowToOpenLayersObjectWrapper(layer).getClassName(); if(layerClassName.equals(Layer.WMS_CLASS_NAME)){ wmsLayer = WMS.narrowToWMS(Layer.getJSObject()); } When you know it's a WMS layer then you can also simply do: WMS wmsLayer = WMS.narrowToWMS(layer.getJSObject()); I will have to describe that on the users wiki... Greetings, Edwin |