Maps Designer display option to Display type.
173087
@ApiModelProperty(hidden=true)
    public static Display getDisplay(String option) {
        if ("Optional".equals(option))
            return Display.Optional;
        else if ("Required".equals(option))
            return Display.Required;
        else if ("Read Only".equals(option))
            return Display.ReadOnly;
        else if ("Hidden".equals(option))
            return Display.Hidden;
        else
            return null;
    }
169307
function MapLabel(opt_options) {
  this.set('fontFamily', 'sans-serif');
  this.set('fontSize', 12);
  this.set('fontColor', '#000000');
  this.set('strokeWeight', 4);
  this.set('strokeColor', '#ffffff');
  this.set('align', 'center');

  this.set('zIndex', 1e3);

  this.setValues(opt_options);
}
64960
def decode_map_element(self, item_type, value):
        """"""
        import urllib
        key = value
        if ":" in value:
            key, value = value.split(':',1)
            key = urllib.unquote(key)
        if Model in item_type.mro():
            value = item_type(id=value)
        else:
            value = self.decode(item_type, value)
        return (key, value)
313095
protected void setShowAllTypes(boolean showAllTypes) {

        m_typeListMode.setValue(showAllTypes ? null : I_CmsLayoutBundle.INSTANCE.galleryDialogCss().typesImportant());
        m_tabHandler.updateSize();
    }
779710
function showValuesAndTypes(
    env,            // :: Array Type
    typeInfo,       // :: TypeInfo
    values,         // :: Array Any
    pos             // :: Integer
  ) {
    var showType = showTypeWith (typeInfo.types);
    return show (pos) + ')  ' + joinWith ('\n    ', Z.map (function(x) {
      return show (x) +
             ' :: ' +
             joinWith (', ',
                       or (Z.map (showType,
                                  determineActualTypesLoose (env, [x])),
                           ['(no types)']));
    }, values));
  }
666967
private function resolveDisplayType()
    {
        $type = null;

        /** Attempt display type resolution without instantiating the property, at first. */
        $metadata = $this->propertyData();
        if ($metadata) {
            if (isset($metadata['display_type'])) {
                $type = $metadata['display_type'];
            }
        }

        if ($this->propertyType || $this->property) {
            $type = $this->property()->displayType();
        }

        return $type;
    }
402418
function setMapType($type) {
        switch($type) {
            case 'hybrid':
                $this->map_type = 'HYBRID';
                break;
            case 'satellite':
                $this->map_type = 'SATELLITE';
                break;
            case 'terrain':
                $this->map_type = 'TERRAIN';
                break;
            case 'map':
            default:
                $this->map_type = 'ROADMAP';
                break;
        }       
    }
1141088
def itemtypes(cls, mapped_types, coll_type, visitor):
        
        rv = list(v for k, v in mapped_types)
        return rv[0] if len(rv) == 1 else rv
1053814
def _geom_type(self, source):
        """"""
        if isinstance(source, AbstractLayer):
            query = source.orig_query
        else:
            query = 'SELECT * FROM "{table}"'.format(table=source)
        resp = self.sql_client.send(
            utils.minify_sql((
                'SELECT',
                '    CASE WHEN ST_GeometryType(the_geom)',
                '               in (\'ST_Point\', \'ST_MultiPoint\')',
                '         THEN \'point\'',
                '         WHEN ST_GeometryType(the_geom)',
                '              in (\'ST_LineString\', \'ST_MultiLineString\')',
                '         THEN \'line\'',
                '         WHEN ST_GeometryType(the_geom)',
                '              in (\'ST_Polygon\', \'ST_MultiPolygon\')',
                '         THEN \'polygon\'',
                '         ELSE null END AS geom_type,',
                '    count(*) as cnt',
                'FROM ({query}) AS _wrap',
                'WHERE the_geom IS NOT NULL',
                'GROUP BY 1',
                'ORDER BY 2 DESC',
            )).format(query=query),
            **DEFAULT_SQL_ARGS)
        if resp['total_rows'] > 1:
            warn('There are multiple geometry types in {query}: '
                 '{geoms}. Styling by `{common_geom}`, the most common'.format(
                     query=query,
                     geoms=','.join(g['geom_type'] for g in resp['rows']),
                     common_geom=resp['rows'][0]['geom_type']))
        elif resp['total_rows'] == 0:
            raise ValueError('No geometry for layer. Check all layer tables '
                             'and queries to ensure there are geometries.')
        return resp['rows'][0]['geom_type']
641641
def update_style(self, mapping):
        """"""
        default = {
            "presentation:background-visible": "true",
            "presentation:background-objects-visible": "true",
            "draw:fill": "solid",
            "draw:fill-color": "#772953",
            "draw:fill-image-width": "0cm",
            "draw:fill-image-height": "0cm",
            "presentation:display-footer": "true",
            "presentation:display-page-number": "false",
            "presentation:display-date-time": "true",
        }
        default.update(mapping)
        style = PageStyle(**default)
        node = style.style_node()
        # add style to automatic-style
        self.preso._auto_styles.append(node)
        # update page style-name
        # found in ._page
        self._page.set(ns("draw", "style-name"), node.attrib[ns("style", "name")])
589562
function GoogleMapsMapType (layers, engine, map) {
  this._layers = layers;
  this._engine = engine;
  this._map = map;

  this._hoveredLayers = [];

  this.tileSize = new google.maps.Size(256, 256);
  this._internalView = new GMapsCartoDBLayerGroupView(this._engine._cartoLayerGroup, {
    nativeMap: map
  });
  this._id = this._internalView._id;
  this._internalView.on('featureClick', this._onFeatureClick, this);
  this._internalView.on('featureOver', this._onFeatureOver, this);
  this._internalView.on('featureOut', this._onFeatureOut, this);
  this._internalView.on('featureError', this._onFeatureError, this);
}
900803
public Object mapRowToReturnType() {
        try {
        return Collections.unmodifiableMap(new ResultSetHashMap(_resultSet, _keys));
        } catch (SQLException e) {
           throw new ControlException("Exception while creating ResultSetHashMap.", e);
        }
    }
526261
def handle_type_inspect(self, call_id, payload):
        """"""
        style = 'fullName' if self.full_types_enabled else 'name'
        interfaces = payload.get("interfaces")
        ts = [i["type"][style] for i in interfaces]
        prefix = "( " + ", ".join(ts) + " ) => "
        self.editor.raw_message(prefix + payload["type"][style])
1176540
function mapStyle(style) {
  var tag = { once: true, type: 'text/css' }
  if (style.css) tag.cssText = style.css
  if (style.type) tag['data-fela-type'] = style.type
  if (style.rehydration) tag['data-fela-rehydration'] = style.rehydration
  if (style.support) tag['data-fela-support'] = style.support
  if (style.media) tag['media'] = style.media
  return tag
}
857987
def _init_map(self, record_types=None, **kwargs):
        """"""

        osid_objects.OsidSourceableForm._init_map(self)
        osid_objects.OsidObjectForm._init_map(self, record_types=record_types)
        self._my_map['copyrightRegistration'] = self._copyright_registration_default
        self._my_map['assignedRepositoryIds'] = [str(kwargs['repository_id'])]
        self._my_map['copyright'] = self._copyright_default
        self._my_map['title'] = self._title_default
        self._my_map['distributeVerbatim'] = self._distribute_verbatim_default
        self._my_map['createdDate'] = self._created_date_default
        self._my_map['distributeAlterations'] = self._distribute_alterations_default
        self._my_map['principalCreditString'] = self._principal_credit_string_default
        self._my_map['publishedDate'] = self._published_date_default
        self._my_map['sourceId'] = self._source_default
        self._my_map['providerLinkIds'] = self._provider_links_default
        self._my_map['publicDomain'] = self._public_domain_default
        self._my_map['distributeCompositions'] = self._distribute_compositions_default
        self._my_map['compositionId'] = self._composition_default
        self._my_map['published'] = self._published_default
        self._my_map['assetContents'] = []
166695
public function showConfiguredTypesCommand()
    {
        $classesAndAnnotations = $this->indexInformer->getClassesAndAnnotations();
        $this->outputFormatted("<b>Available document type</b>");
        /** @var $annotation Indexable */
        foreach ($classesAndAnnotations as $className => $annotation) {
            $this->outputFormatted("%s", [$className], 4);
        }
    }
782138
def print_mso_auto_shape_type_constants():
    """"""
    auto_shape_types = MsoAutoShapeTypeCollection.load(sort='const_name')
    out = render_mso_auto_shape_type_constants(auto_shape_types)
    print out