Provides the "ngeoScaleselector" directive, a widget for selecting map scales.
<div ngeo-scaleselector="ctrl.scales" ngeo-scaleselector-map="ctrl.map"> </div>
The expression passed to the ngeo-scaleselector attribute should return an object of this form:
[20000, 10000, 5000, 2500]
This object's keys are strings representing zoom levels, the values are strings representing scales. The directive's partial uses ng-bind-html so the scale strings should be trusted.
That directive's partial uses Bootstrap's
data-toggle="dropdown", so it is meant to be used with
Bootstrap's "dropdown" jQuery plugin.
By default the directive uses "scaleselector.html" as its templateUrl. This an be changed by redefining the "ngeoScaleselectorTemplateUrl" value.
The directive has its own scope, but it is not isolate scope. That scope includes a reference to the directive's controller: the "scaleselectorCtrl" scope property.
The directive doesn't create any watcher. In particular the object including the scales information is now watched.
See our live example: ../examples/scaleselector.html
||The available scales (key: scale, value: display text).|
Directive Definition Object.