dist/angular-datamaps.js
function mapOptions() {
          return {
            element: element[0],
            scope: 'usa',
            height: scope.height,
            width: scope.width,
            fills: { defaultFill: '#b9b9b9' },
            data: {},
            done: function (datamap) {
              function redraw() {
                datamap.svg.selectAll('g').attr('transform', 'translate(' + d3.event.translate + ')scale(' + d3.event.scale + ')');
              }
              if (angular.isDefined(attrs.onClick)) {
                datamap.svg.selectAll('.datamaps-subunit').on('click', function (geography) {
                  scope.onClick()(geography);
                });
              }
              if (angular.isDefined(attrs.zoomable)) {
                datamap.svg.call(d3.behavior.zoom().on('zoom', redraw));
              }
            }
          };
        }
function mapOptions() {
          return {
            element: element[0],
            scope: 'usa',
            height: scope.height,
            width: scope.width,
            fills: { defaultFill: '#b9b9b9' },
            data: {},
            done: function (datamap) {
              function redraw() {
                datamap.svg.selectAll('g').attr('transform', 'translate(' + d3.event.translate + ')scale(' + d3.event.scale + ')');
              }
              if (angular.isDefined(attrs.onClick)) {
                datamap.svg.selectAll('.datamaps-subunit').on('click', function (geography) {
                  scope.onClick()(geography);
                });
              }
              if (angular.isDefined(attrs.zoomable)) {
                datamap.svg.call(d3.behavior.zoom().on('zoom', redraw));
              }
            }
          };
        }
function mapOptions ( ) { return { element : element [ 0 ] , scope : 'usa' , height : scope . height , width : scope . width , fills : { defaultFill : '#b9b9b9' } , data : { } , done : function ( datamap ) { function redraw ( ) { datamap . svg . selectAll ( 'g' ) . attr ( 'transform' , 'translate(' + d3 . event . translate + ')scale(' + d3 . event . scale + ')' ) ; } if ( angular . isDefined ( attrs . onClick ) ) { datamap . svg . selectAll ( '.datamaps-subunit' ) . on ( 'click' , function ( geography ) { scope . onClick ( ) ( geography ) ; } ) ; } if ( angular . isDefined ( attrs . zoomable ) ) { datamap . svg . call ( d3 . behavior . zoom ( ) . on ( 'zoom' , redraw ) ) ; } } } ; }
Generate base map options
Generate base map options