add design assertions to the doc/ol3.txt doc

This commit is contained in:
Éric Lemoine
2012-07-05 11:51:05 +02:00
committed by Tom Payne
parent 2474429f8c
commit 1bd975bc23

View File

@@ -205,3 +205,42 @@ Question: who determines "best" resolution? (static function?)
Todo: if tile layer extent stored in TileLayer rather than TileGrid then extent will occasionally need to be passed to TileGrid functions for cropping
DESIGN ASSERTIONS
=================
- A map has a renderer (the map renderer).
- A map has a camera.
- Multiple maps can share the same camera.
- A map has a layer list.
- A layer view stores view-related states for a layer.
- View-related states include visibility, opacity, saturation, hue, etc.
- A layer view has a layer.
- Multiple layer views can share the same layer.
- In other words a layer can be viewed in different manners.
- The map renderer responds to events.
- The map renderer receives events from the camera.
- The map renderer creates layer renderers.
- A layer can have multiple projections (the supported projections).
- A layer advertizes the projections it supports.
- A layer returns no data if asked data for an unsupported projection.
- A control may listen to map events.
- A control may listen to camera events.
- A map navigation control acts on the camera.
- Types can be described in MVC terms.
- Models don't know what rendering means.
- Maps are models.
- Layers are models.
- Layer views are models (sorry!).
- Cameras are models.
- Layer lists are collections.
- Renderers are views.
- Controls are views or controllers or both.
- An attribution control is a view.
- A map navigation control is a controller.
- A zoom slider control is both a view and a controller.