Esri/esri-leaflet — pull request #424 by jgravois (2014-12-24 06:19:21+00:00)
Title: add support for supplying 0,0 to designate unrestricted min/maxZoom constructor values

when trying to call FeatureLayer.metadata() to update min/maxZoom with values provided by the service itself, i ran into a couple hiccups...

* feature services present raw scale values, which must be translated into zoom levels
* a value of 0 in the service metadata indicates that the layer does not have a drawing restriction. for maxZoom, this needs to be replaced by the largest actual zoom level available in the map

1. This pull request introduces support for using 0/0 as zoom constructor values, resulting in a layer that draws at all scales.

```
var counties = new L.esri.Layers.FeatureLayer('http://sampleserver5.arcgisonline.com/arcgis/rest/services/Census/MapServer/2', {
minZoom: 0,
maxZoom: 0
});
```

2. I also added a utility method to L.esri.Util to translate raw scale values into zoom levels.
3. test coverage is included as well.

this is my test code:
```
var map = L.map('map').setView([37.75, -122.23], 12);
L.esri.basemapLayer('Topographic').addTo(map);

var blockGroups = new L.esri.Layers.FeatureLayer('http://sampleserver5.arcgisonline.com/arcgis/rest/services/Census/MapServer/1').addTo(map);

// create the layer and add it to the map, then update zoom values based on service metadata
blockGroups.metadata(function(error, response) {
dynMin = L.esri.Util.scaleToLevel(response.minScale);
blockGroups.options.minZoom = dynMin;

dynMax = L.esri.Util.scaleToLevel(response.maxScale);
blockGroups.options.maxZoom = dynMax;
});
```
cc @MandarinConLaBarba