app/models/visualization/vizjson.rb
# Return the layer group data for a named map
Return the layer group data for a named map
Return the layer group data for a named map
def layer_group_for_named_map
        layer_group_poro = layer_group_for(visualization)
        return nil if layer_group_poro.nil?
        layers_data = Array.new
        layer_group_poro[:options][:layer_definition][:layers].each { |layer|
          layers_data.push( {
            type:     layer[:type],
            options:  layer[:options]
          } )
        }
        {
          version:  layer_group_poro[:options][:layer_definition][:version],
          layers:   layers_data
        }
      end
def layer_group_for_named_map layer_group_poro = layer_group_for ( visualization ) return nil if layer_group_poro . nil? layers_data = Array . new layer_group_poro [ :options ] [ :layer_definition ] [ :layers ] . each { | layer | layers_data . push ( { type : layer [ :type ] , options : layer [ :options ] } ) } { version : layer_group_poro [ :options ] [ :layer_definition ] [ :version ] , layers : layers_data } end
Return the layer group data for a named map
Return the layer group data for a named map
# If there is *only* a torque layer, there is no layergroup