openlayers/ol3 — pull request #1888 by twpayne (2014-03-21 15:01:56+00:00)
Title: Optional fixed draw order

The fact that the draw order of features with the same z index is undefined has [caused some confusion on the mailing list](https://groups.google.com/d/msg/ol3-dev/OKzynLnmePA/QbOcvOmTNigJ).

This PR adds an optional `fixedOrder` property to `ol.layer.Vector` that specifies that features should be drawn in a fixed order. At the moment this `fixedOrder` is taken from the feature's `goog.getUid`, which is a proxy for the order in which the features were created. Note that this is not the same order as the features might have been added to the source, but will often correspond to the order in which they were deserialised.

You can see the effect of the fixed order in the KML example by trying the following commands in the console:
```js
map.getLayers().getAt(1).setFixedOrder(true);
map.getLayers().getAt(1).setFixedOrder(false);
```

The disadvantage of using a fixed order this that extra memory and time is required to sort the features before rendering.

There's probably a better name for the property than `fixedOrder`.