Method to update the basemap
@param {string} basemap - the value of the basemap to be updated, should come from config.js basemaps
961998
function setBasemap(basemap) {
      app.debug('MapActions >>> setBasemap');
      app.map.setBasemap(basemap);
      _jsDispatcher.Dispatcher.dispatch({
        actionType: _jsConstantsAppConstants.MAP.basemap,
        data: basemap
      });
    }
402191
public void setMap(Map map) {
		this.map = (MapImpl) map;
		mapWidget = this.map.getMapWidget();
		delegate = new GeometryEditorImpl(mapWidget);
		editingService = new JsGeometryEditService(delegate.getEditService());
		splitService = new JsGeometrySplitService(delegate.getEditService());
		mergeService = new JsGeometryMergeService();
		renderer = new JsGeometryRenderer(delegate.getRenderer());
		styleService = new JsStyleService(delegate.getStyleService());
		snapService = new JsSnapService(this);
	}
311754
function _updateLayerName($canvas, data, layer, props) {
	var nameMap = data.layer.names;

	// If layer name is being added, not changed
	if (!props) {

		props = layer;

	} else {

		// Remove old layer name entry because layer name has changed
		if (props.name !== undefined && isString(layer.name) && layer.name !== props.name) {
			delete nameMap[layer.name];
		}

	}

	// Add new entry to layer name map with new name
	if (isString(props.name)) {
		nameMap[props.name] = layer;
	}
}
1182800
def dict_update(base_dict, update_dict):
    
    if isinstance(update_dict, dict):
        base_dict.update(update_dict)

    return base_dict
803394
function( map ) {
					var code;
					if ( map ) {
						if ( completed ) {

							// Execute the appropriate callbacks
							jqXHR.always( map[ jqXHR.status ] );
						} else {

							// Lazy-add the new callbacks in a way that preserves old ones
							for ( code in map ) {
								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
							}
						}
					}
					return this;
				}
909128
function update(config) {
	var me = this;
	var preservation = config && config.preservation;
	var tooltip, lastActive, tooltipLastActive, lastMouseEvent;

	if (preservation) {
		tooltip = me.tooltip;
		lastActive = me.lastActive;
		tooltipLastActive = tooltip._lastActive;
		me._bufferedRender = true;
	}

	Chart.prototype.update.apply(me, arguments);

	if (preservation) {
		me._bufferedRender = false;
		me._bufferedRequest = null;
		me.lastActive = lastActive;
		tooltip._lastActive = tooltipLastActive;

		if (me.animating) {
			// If the chart is animating, keep it until the duration is over
			Chart.animationService.animations.forEach(function(animation) {
				if (animation.chart === me) {
					me.render({
						duration: (animation.numSteps - animation.currentStep) * 16.66
					});
				}
			});
		} else {
			// If the chart is not animating, make sure that all elements are at the final positions
			me.data.datasets.forEach(function(dataset, datasetIndex) {
				me.getDatasetMeta(datasetIndex).controller.transition(1);
			});
		}

		if (tooltip._active) {
			tooltip.update(true);
		}

		lastMouseEvent = me.streaming.lastMouseEvent;
		if (lastMouseEvent) {
			me.eventHandler(lastMouseEvent);
		}
	}
}
166676
function(map) {
        this.handlers.feature.setMap(map);
        if (this.box) {
            this.handlers.box.setMap(map);
        }
        OpenLayers.Control.prototype.setMap.apply(this, arguments);
    }
17946
function() {
        
        if (this.map.baseLayer) {
            //dont need to listen for this one anymore
            this.map.events.unregister('changebaselayer', this, 
                                       this.setCenter);
            
            if (this.displayProjection) {
                this.center.transform(this.displayProjection, 
                                      this.map.getProjectionObject()); 
            }      

            this.map.setCenter(this.center, this.zoom);
        }
    }
256446
protected void updateBaseUrl() {
        Log.d(IMapView.LOGTAG, "updateBaseUrl");
        final String subDomain = mImageryData.getSubDomain();
        final int idx = mImageryData.m_imageUrl.lastIndexOf("/");
        if (idx > 0) {
            mBaseUrl = mImageryData.m_imageUrl.substring(0, idx);
        } else {
            mBaseUrl = mImageryData.m_imageUrl;
        }

        mUrl = mImageryData.m_imageUrl;
        if (subDomain != null) {
            mBaseUrl = String.format(mBaseUrl, subDomain);
            mUrl = String.format(mUrl, subDomain, "%s", mLocale);
        }
        Log.d(IMapView.LOGTAG, "updated url = " + mUrl);
        Log.d(IMapView.LOGTAG, "end updateBaseUrl");
    }
777396
function multiMapSet(multimap, key, value) {
  if (!multimap.has(key)) {
    multimap.set(key, new Set());
  }
  const values = multimap.get(key);
  if (!values.has(value)) {
    values.add(value);
    return true;
  }
  return false;
}
1121635
function (apiBaseUrl, apiKey, projectId) {
  this.config = {
    apiBaseUrl: apiBaseUrl,
    apiKey:     apiKey,
    projectId:  projectId
  };
}
1165908
function() {

        // set the newly selected base layer
        for(var i=0, len=this.baseLayers.length; i<len; i++) {
            var layerEntry = this.baseLayers[i];
            if (layerEntry.inputElem.checked) {
                this.map.setBaseLayer(layerEntry.layer, false);
            }
        }

        // set the correct visibilities for the overlays
        for(var i=0, len=this.dataLayers.length; i<len; i++) {
            var layerEntry = this.dataLayers[i];
            layerEntry.layer.setVisibility(layerEntry.inputElem.checked);
        }

    }
384008
function BaseCoverArt(options) {

  options = options || {};

  this.userAgent = options.userAgent || _userAgent;
  this.host = _host;
  this.basePath = _path;
  this.http = _http;
}
997801
protected void updateBasePath(String basePath) {

        if (m_folderOrName != null) {
            if (m_folderOrName.isName()) {
                m_folderOrName = new CmsContentFolderDescriptor(basePath, m_folderOrName.getFolderName());
            }
        } else {
            m_folderOrName = new CmsContentFolderDescriptor(basePath, m_typeName);
        }
    }
946712
function inheritedMapOfMaps(name, Meta) {
    var key = memberProperty(name);
    var capitalized = capitalize(name);

    Meta.prototype['write' + capitalized] = function (subkey, itemkey, value) {
      var outerMap = this._getOrCreateOwnMap(key);
      var innerMap = outerMap[subkey];
      if (!innerMap) {
        innerMap = outerMap[subkey] = new _emberMetalEmpty_object.default();
      }
      innerMap[itemkey] = value;
    };

    Meta.prototype['peek' + capitalized] = function (subkey, itemkey) {
      var pointer = this;
      while (pointer !== undefined) {
        var map = pointer[key];
        if (map) {
          var value = map[subkey];
          if (value) {
            if (value[itemkey] !== undefined) {
              return value[itemkey];
            }
          }
        }
        pointer = pointer.parent;
      }
    };

    Meta.prototype['has' + capitalized] = function (subkey) {
      var pointer = this;
      while (pointer !== undefined) {
        if (pointer[key] && pointer[key][subkey]) {
          return true;
        }
        pointer = pointer.parent;
      }
      return false;
    };

    Meta.prototype['forEachIn' + capitalized] = function (subkey, fn) {
      return this._forEachIn(key, subkey, fn);
    };
  }
318365
function setupMap( config ) {
    var layerSettings, defaultSettings,
      query = '',
      matchLang = location.search.match( /lang=([-_a-zA-Z]+)/ );

    defaultSettings = {
      maxzoom: 18,

      // TODO: This is UI text, and needs to be translatable.
      attribution: 'Map data &copy; <a href="http://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
    };

    if ( matchLang ) {
      query = '?lang=' + matchLang[ 1 ];
    }
    config = config || {};

    layerSettings = {
      maxZoom: config.maxzoom !== undefined ? config.maxzoom : defaultSettings.maxzoom,

      // TODO: This is UI text, and needs to be translatable.
      attribution: config.attribution !== undefined ? config.attribution : defaultSettings.attribution,

      id: 'map-01'
    };

    // Add a map layer
    L.tileLayer( style + '/{z}/{x}/{y}' + scalex + '.png' + query, layerSettings ).addTo( map );

    // Add a km/miles scale
    L.control.scale().addTo( map );

    // Update the zoom level label
    map.on( 'zoomend', function () {
      document.getElementById( 'zoom-level' ).innerHTML = 'Zoom Level: ' + map.getZoom();
    } );

    // Add current location to URL hash
    new L.Hash( map ); // eslint-disable-line no-new
  }
585926
public static function setDatabaseMap($name, DatabaseMap $map)
    {
        if ($name === null) {
            $name = self::getDefaultDB();
        }
        self::$dbMaps[$name] = $map;
    }