This commit adds a third parameter to the L.LatLon class for specifying
altitude. This is in turn stored in the `.latitude` property for the LatLng
instance. Latitude property will only be set if the latitude parameter is not
undefined, this is done in order to ensure backwards compability.
```javascript
var latlng = new L.LatLng(10, 20, 30);
console.log(latlng.altitude); // prints '30' to the console
```
Similar functionality has been added to L.GeoJSON coordsToLatLng() and
latLngToCoords() methods in order to handle import and export of 3D GeoJSON.
```javascript
var geoJSON = {
type: 'Feature'
,properties: {}
,geometry: {
type: 'Point'
,coordinates: [20, 10, 30]
}
}
var layer = new L.GeoJSON();
layer.addData(geoJSON);
console.log(layer.getLayers()[0].getLatLng().altitude);
```
`NB` It is important to notice that no logic has been added in order to prevent
latitude and longitude to change without appropirate change in altitude – this
must be handled by the application.
The rationale is this: the spec string describes the expected
behavior unconditionally. The code examples, on the other hand,
set up an expectation that is tested with the call to the expect
method. The code examples can violate the expectation, but the
spec string does not. The value of the spec string is as clearly
as possible describing the behavior. Including “should” in that
description adds no value. (From http://rubyspec.org/style_guide/)