Details
Description
MapContext and MapLayer have really grown over time - and in some cases have diverged from their actual use.
The proposal for simplification is here:
The focus is on cleaning up MapLayer:
- MapLayer replaced by Layer class
- Specific Layer subclasses for different kinds of content; this is an open ended set allowing additional kinds of layers to be added over time for TileServers, Google Maps and so forth
- DefaultMapLayer re-factored to use an internal Layer delegate (so existing code will not be broken; and importantly will not be duplicated)
Over the course of the proposal MapContext and DefaultMapContext were also re-factored:
- Turn MapContext into a class allowing DefaultmapContext to be deprecated (same solution as Query)
- Super class called MapContent introduced
- MapContent uses layers() method to provide direct access to the layer list
- MapContent improved "viewport" methods
- Responsibilities for maintaining "area of interest" isolated into a separate MapViewport class
- MapContent can use a Mapviewport internally to maintain screen and where to draw information
- MapViewport can be used directly when drawing the same MapContent into several tiles
This proposal does not break any existing API; it provides a safe migration path forward (and like the Query proposal) makes use of classes directly for a simplified experience.
Issue Links
- is depended upon by
-
GEOT-3150
Update GTRender to use MapContent, MapViewport and Layer
-