Details
Description
MapContent is advertised in the docs as the class to use in preference to MapContext for new development. The attached patch does the following:
- adds setMapContent and getMapContent methods to GTRenderer and StreamingRenderer
- replaces the MapContext instance in StreamingRenderer with a MapContent instance
- deprecates setContext and getContext methods
I also see that the patch removes some c coding style bits with more java like ones (David B. used to code in java as it that was C in fact), but I'm unsure if all of them are actually equivalent. See this bit:
{code}
// skip layers that do have only one fts
- if(layer.getStyle().getFeatureTypeStyles().length < 2)
+ if (!(layer instanceof FeatureLayer)) {
continue;
+ }
+ FeatureLayer featureLayer = (FeatureLayer) layer;
+
+ if (featureLayer.getStyle().featureTypeStyles().size() < 2) continue;
+
{code}
Maybe it is equivalent but after 10 hours of work I'm too tired to tell :-p
Allow me some more time to look into the patch. Maybe next time split it into two, code cleanups in one patch, api changes in the other.