Get the map legend attribute from the layer keywords if possible.

        :returns: None on error, otherwise the attributes (notes and units).
        :rtype: None, str
497143
def map_legend_attributes(self):
        
        LOGGER.debug('InaSAFE Map getMapLegendAttributes called')
        legend_attribute_list = [
            'legend_notes',
            'legend_units',
            'legend_title']
        legend_attribute_dict = {}
        for legend_attribute in legend_attribute_list:
            # noinspection PyBroadException
            try:
                legend_attribute_dict[legend_attribute] = \
                    self._keyword_io.read_keywords(
                        self.impact, legend_attribute)
            except KeywordNotFoundError:
                pass
            except Exception:  # pylint: disable=broad-except
                pass
        return legend_attribute_dict
613759
def findLayer( self, layerName ):
        
        for layer in self._layers:
            if ( layer.name() == layerName ):
                return layer
        return None
399608
def get_attrs(self):
        
        self.non_index_axes = []
        self.nan_rep = None
        self.levels = []

        self.index_axes = [a.infer(self)
                           for a in self.indexables if a.is_an_indexable]
        self.values_axes = [a.infer(self)
                            for a in self.indexables if not a.is_an_indexable]
        self.data_columns = [a.name for a in self.values_axes]
627180
def getRankMaps(self):
        

        rankMaps = []
        for preference in self.preferences:
            rankMaps.append(preference.getRankMap())
        return rankMaps
102217
def hasannotationlayer(self, annotationtype=None,set=None):
        """"""
        l = self.layers(annotationtype, set)
        return (len(l) > 0)
524034
def layer(self, layer_name):
		
		if layer_name in self.__layers.keys():
			return self.__layers[layer_name]
		elif layer_name in self.__class__.__builtin_layers__:
			return self.__class__.__builtin_layers__[layer_name]

		raise RuntimeError('Invalid layer name')
232107
def get(self, **kwargs):
        
        if not len(kwargs) == 1:
            raise AttributeError('Only one keyword expected')
        key, value = kwargs.popitem()
        return getattr(self, key)[value]
835491
def data_attrs(mapitem):
    
    data_attrs = {}

    try:
        data_attrs['marker-detail-api-url'] = reverse('fluentcms-googlemaps-marker-detail')
    except NoReverseMatch:
        pass

    data_attrs.update(mapitem.get_map_options())
    return mark_safe(u''.join([
        format_html(u' data-{0}="{1}"', k.replace('_', '-'), _data_value(v))
        for k, v in data_attrs.items()
    ]))
1143412
def get_field_mapping(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.get_field_mapping(index=self._name, **kwargs)
787810
def attrs(self) -> Mapping:
        
        if self._attrs is None:
            self._attrs = OrderedDict()
        return self._attrs
226020
def _dep_map(self):
        
        try:
            return self.__dep_map
        except AttributeError:
            self.__dep_map = self._filter_extras(self._build_dep_map())
        return self.__dep_map
427352
def get_attributes(self):
        
        attr = ['chr', 'start', 'stop']
        if self.strandPos is not None:
            attr.append('strand')
        if self.otherPos:
            for i, o in enumerate(self.otherPos):
                attr.append(o[1])

        return attr
1364317
def find_mappable(*axes):
    
    for ax in axes:
        for aset in ('collections', 'images'):
            try:
                return getattr(ax, aset)[-1]
            except (AttributeError, IndexError):
                continue
    raise ValueError("Cannot determine mappable layer on any axes "
                     "for this colorbar")
744108
def get_maps_stats(self):
        
        tpes = {}
        for m in self.maps:
            if m.tpe in tpes:
                tpes[m.tpe] += 1
            else:
                tpes[m.tpe] = 1
        return tpes
1043515
def get_ndmapping_label(ndmapping, attr):
    
    label = None
    els = itervalues(ndmapping.data)
    while label is None:
        try:
            el = next(els)
        except StopIteration:
            return None
        if not getattr(el, '_auxiliary_component', True):
            label = getattr(el, attr)
    if attr == 'group':
        tp = type(el).__name__
        if tp == label:
            return None
    return label
348026
def get_layer(self, class_: Type[L], became: bool=True) -> L:
        

        try:
            return self._index[class_][0]
        except KeyError:
            if became:
                return self._transformed[class_][0]
            else:
                raise
1056304
def get_map_data(self):
        

        return {
            'containerSelector': '#' + self.get_map_element_id(),
            'center': self.map_center_description,
            'marker': self.map_marker_description or self.map_center_description,
            'zoom': self.map_zoom,
            'href': self.get_map_href(),
            'key': getattr(settings, 'GOOGLE_MAPS_API_KEY', ''),
            # Python's line-splitting is more cross-OS compatible, so we feed
            # a pre-built array to the front-end
            'description': [
                line for line in self.map_description.splitlines() if line
            ],
        }