@fileoverview Map Label.

@author Luke Mahe (lukem@google.com),
Chris Broadfoot (cbro@google.com)
 
Creates a new Map Label
@constructor
@extends google.maps.OverlayView
@param {Object.<string, *>=} opt_options Optional properties to set.
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);
}
569879
function(name, options) {
        options = options || {};
        if(!options.version) {
            options.version = typeof GMap2 === "function" ? "2" : "3";
        }
        var mixin = OpenLayers.Layer.Google["v" +
            options.version.replace(/\./g, "_")];
        if (mixin) {
            OpenLayers.Util.applyDefaults(options, mixin);
        } else {
            throw "Unsupported Google Maps API version: " + options.version;
        }

        OpenLayers.Util.applyDefaults(options, mixin.DEFAULTS);
        if (options.maxExtent) {
            options.maxExtent = options.maxExtent.clone();
        }

        OpenLayers.Layer.EventPane.prototype.initialize.apply(this,
            [name, options]);
        OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this, 
            [name, options]);

        if (this.sphericalMercator) {
            OpenLayers.Util.extend(this, OpenLayers.Layer.SphericalMercator);
            this.initMercatorParameters();
        }    
    }
476794
function(options) {
        options = options || {};
        options.layerName = options.layerName || OpenLayers.i18n("Graticule");
        OpenLayers.Control.prototype.initialize.apply(this, [options]);
        
        this.labelSymbolizer.stroke = false;
        this.labelSymbolizer.fill = false;
        this.labelSymbolizer.label = "${label}";
        this.labelSymbolizer.labelAlign = "${labelAlign}";
        this.labelSymbolizer.labelXOffset = "${xOffset}";
        this.labelSymbolizer.labelYOffset = "${yOffset}";
    }
997346
function (p_oOverlay) {

            var oOverlay = this.find(p_oOverlay),
                nTopZIndex,
                oTopOverlay,
                aOverlays;

            if (oOverlay) {

                aOverlays = this.overlays;
                aOverlays.sort(this.compareZIndexDesc);

                oTopOverlay = aOverlays[0];

                if (oTopOverlay) {
                    nTopZIndex = Dom.getStyle(oTopOverlay.element, "zIndex");

                    if (!isNaN(nTopZIndex)) {

                        var bRequiresBump = false;

                        if (oTopOverlay !== oOverlay) {
                            bRequiresBump = true;
                        } else if (aOverlays.length > 1) {
                            var nNextZIndex = Dom.getStyle(aOverlays[1].element, "zIndex");
                            // Don't rely on DOM order to stack if 2 overlays are at the same zindex.
                            if (!isNaN(nNextZIndex) && (nTopZIndex == nNextZIndex)) {
                                bRequiresBump = true;
                            }
                        }

                        if (bRequiresBump) {
                            oOverlay.cfg.setProperty("zindex", (parseInt(nTopZIndex, 10) + 2));
                        }
                    }
                    aOverlays.sort(this.compareZIndexDesc);
                }
            }
        }
24589
function(opt) {
    var opt = opt || {};

    // required
    this.group_size = typeof opt.group_size !== 'undefined' ? opt.group_size : 2;

    // computed
    this.out_sx = opt.in_sx;
    this.out_sy = opt.in_sy;
    this.out_depth = Math.floor(opt.in_depth / this.group_size);
    this.layer_type = 'maxout';

    this.switches = global.zeros(this.out_sx*this.out_sy*this.out_depth); // useful for backprop
  }
961118
@Override
    protected View createOverlayView() {
        LinearLayout ll = new LinearLayout(getContext());
        ll.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT));
        ll.setGravity(Gravity.CENTER);
        View progressBar = createProgressBar();
        ll.addView(progressBar);
        return ll;
    }
152515
function (opts, obj) {
			var overlay = this.overlay;

			$('.fancybox-overlay').stop(true, true);

			if (!overlay) {
				this.create(opts);
			}

			if (opts.locked && this.fixed && obj.fixed) {
				if (!overlay) {
					this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false;
				}

				obj.locked = this.overlay.append( obj.wrap );
				obj.fixed  = false;
			}

			if (opts.showEarly === true) {
				this.beforeShow.apply(this, arguments);
			}
		}
1121031
function( options ){
      var obj = options.map;
      var key;
      var keys = options.keys;
      var l = keys.length;

      for(var i = 0; i < l; i++){
        var key = keys[i];

        if( $$.is.plainObject( key ) ){
          $$.util.error('Tried to set map with object key');
        }

        if( i < keys.length - 1 ){
          
          // extend the map if necessary
          if( obj[key] == null ){
            obj[key] = {};
          }
          
          obj = obj[key];
        } else {
          // set the value
          obj[key] = options.value;
        }
      }
    }
988234
function(type, vis, data) {
    var t = Overlay._types[type];

    if (!t) {
      cdb.log.error("Overlay: " + type + " does not exist");
      return;
    }

    data.options = typeof data.options === 'string' ? JSON.parse(data.options): data.options;
    data.options = data.options || {}
    var widget = t(data, vis);

    if (widget) {
      widget.type = type;
      return widget;
    }

    return false;
  }
388633
function(options) {
      if (this.options) options = _.extend({}, this.options, options);
      for (var i = 0, l = viewOptions.length; i < l; i++) {
        var attr = viewOptions[i];
        if (options[attr]) this[attr] = options[attr];
      }
      this.options = options;
    }
674304
function LabelView() {
        NodeView.apply(this, arguments);
        this.parentStyle = true;
        this.selectable = SK_NO;

        /** @member {string} */
        this.underline = false;

        /** @member {string} */
        this.text = "";

        /** @member {number} */
        this.horizontalAlignment = Graphics.AL_CENTER;

        /** @member {number} */
        this.verticalAlignment = Graphics.AL_MIDDLE;

        /** @member {number} */
        this.direction = DK_HORZ;

        /** @member {boolean} */
        this.wordWrap = false;

    }
220860
private Optional<MapLabelSetter> createField(final Class<?> beanClass, final String fieldName) {
        
        final String labelFieldName = fieldName + "Label";
        
        final Field labelField;
        try {
            labelField = beanClass.getDeclaredField(labelFieldName);
            labelField.setAccessible(true);
            
        } catch (NoSuchFieldException | SecurityException e) {
            return Optional.empty();
        }
        
        if(!Map.class.isAssignableFrom(labelField.getType())) {
            return Optional.empty();
        }
        
        final ParameterizedType type = (ParameterizedType) labelField.getGenericType();
        final Class<?> keyType = (Class<?>) type.getActualTypeArguments()[0];
        final Class<?> valueType = (Class<?>) type.getActualTypeArguments()[1];
        
        if(keyType.equals(String.class) && valueType.equals(String.class)) {
            
            return Optional.of(new MapLabelSetter() {
                
                @SuppressWarnings("unchecked")
                @Override
                public void set(final Object beanObj, final String label, final String key) {
                    ArgUtils.notNull(beanObj, "beanObj");
                    ArgUtils.notEmpty(label, "label");
                    
                   try {
                       Map<String, String> labelMapObj = (Map<String, String>) labelField.get(beanObj);
                       if(labelMapObj == null) {
                           labelMapObj = new LinkedHashMap<>();
                           labelField.set(beanObj, labelMapObj);
                       }
                       
                       
                       labelMapObj.put(key, label);
                       
                    } catch (IllegalArgumentException | IllegalAccessException e) {
                        throw new RuntimeException("fail access label field.", e);
                    }
                }
            });
            
        }
        
        return Optional.empty();
    }
464360
function (options) {
		
			inputEx.DSSelectField.superclass.setOptions.call(this, options);
		
			this.options.valueKey = options.valueKey || "value";
			this.options.labelKey = options.labelKey || "label";
		
			this.options.datasource = options.datasource;
		
		}
642755
function Overlay(options) {
	if (!(this instanceof Overlay)) return new Overlay(options);

	Emitter.call(this);

	extend(this, options);

	if (!this.container) {
		this.container = document.body || document.documentElement;
	}

	//create overlay element
	this.element = document.createElement('div');
	this.element.classList.add('popoff-overlay');

	if (this.closable) {
		this.element.addEventListener('click', e => {
			this.hide();
		});
		this.element.classList.add('popoff-closable');
	}
}
633697
function(idx, label, opt) {

        var labels = this.labels();

        idx = (isFinite(idx) && idx !== null) ? (idx | 0) : 0;
        if (idx < 0) idx = labels.length + idx;

        // getter
        if (arguments.length <= 1) return this.prop(['labels', idx]);
        // setter
        return this.prop(['labels', idx], label, opt);
    }
664937
function (component, params) {

			var _params = {
					cssClass: params.cssClass,
					labelStyle: component.labelStyle,
					id: _internalLabelOverlayId,
					component: component,
					_jsPlumb: component._jsPlumb.instance  // TODO not necessary, since the instance can be accessed through the component.
				},
				mergedParams = jsPlumb.extend(_params, params);

			return new _jp.Overlays[component._jsPlumb.instance.getRenderMode()].Label(mergedParams);
		}
191995
function TMXTiledMap (opts) {
    TMXTiledMap.superclass.constructor.call(this, opts)

    this.anchorPoint = ccp(0, 0)

    var mapInfo

    var initialize = function () {
        this.mapSize        = mapInfo.mapSize
        this.tileSize       = mapInfo.tileSize
        this.mapOrientation = mapInfo.orientation
        this.objectGroups   = mapInfo.objectGroups
        this.properties     = mapInfo.properties
        this.tileProperties = mapInfo.tileProperties

        // Add layers to map
        var idx = 0
        mapInfo.layers.forEach(function (layerInfo) {
            if (layerInfo.visible) {
                var child = this.parseLayer({layerInfo: layerInfo, mapInfo: mapInfo})
                this.addChild({child: child, z: idx, tag: idx})

                var childSize   = child.contentSize
                var currentSize = this.contentSize
                currentSize.width  = Math.max(currentSize.width,  childSize.width)
                currentSize.height = Math.max(currentSize.height, childSize.height)
                this.contentSize = currentSize

                idx++
            }
        }.bind(this))
    }.bind(this)


    if (opts.file) {
        mapInfo = new TMXMapInfo({file: opts.file})
        initialize()
    } else if (opts.url) {
        var xhr = new XMLHttpRequest
        xhr.onreadystatechange = function () {
            if (xhr.readyState == 4) {
                var url = opts.url

                // Create absolute URL
                if (/^\/\//.test(url)) {
                    // URL prefixed with double slash
                    url = window.location.protocol + url
                } else if (/^\//.test(url)) {
                    // URL with single slash prefix
                    url = window.location.protocol + "//" + window.location.hostname + url
                } else {
                    url = window.location.href.replace(/\/[^\/]*$/, '/') + url
                }

                mapInfo = new TMXMapInfo({filename: url, xml: xhr.responseText})
                initialize()
            }
        }
        xhr.open('GET', opts.url, true)
        xhr.send(null)
    } else if (opts.xml) {
        mapInfo = new TMXMapInfo({xml: opts.xml})
        initialize()
    }
}