Adds the marker to the panel.

        :param marker: Marker to add
        :type marker: pyqode.core.modes.Marker
192187
def add_marker(self, marker):
        
        self._markers.append(marker)
        doc = self.editor.document()
        assert isinstance(doc, QtGui.QTextDocument)
        block = doc.findBlockByLineNumber(marker._position)
        marker.block = block
        d = TextDecoration(block)
        d.set_full_width()
        if self._background:
            d.set_background(QtGui.QBrush(self._background))
            marker.decoration = d
        self.editor.decorations.append(d)
        self.repaint()
778277
public void info(Marker marker, String msg) {
        if (!logger.isInfoEnabled(marker))
            return;
        if (instanceofLAL) {
            ((LocationAwareLogger) logger).log(marker, fqcn, LocationAwareLogger.INFO_INT, msg, null, null);
        } else {
            logger.info(marker, msg);
        }
    }
537878
def setCurrentDebugLine( self, lineno ):
        
        self.markerDeleteAll(self._currentDebugMarker)
        self.markerAdd(lineno, self._currentDebugMarker)
        self.setCurrentLine(lineno)
707767
def to_marker(marker):
        
        from sevenbridges.models.marker import Marker
        if not marker:
            raise SbgError('Marker is required!')
        elif isinstance(marker, Marker):
            return marker.id
        elif isinstance(marker, six.string_types):
            return marker
        else:
            raise SbgError('Invalid marker parameter!')
527299
function (options) {
            google.maps.Marker.prototype.setMap.apply(this, [options]);
            (this.MarkerLabel) && this.MarkerLabel.setMap.apply(this.MarkerLabel, [options]);
        }
1017307
def draw_markers(self):
        """"""
        self._canvas_markers.clear()
        for marker in self._markers.values():
            self.create_marker(marker["category"], marker["start"], marker["finish"], marker)
317392
public void addChildComponent(final WicketField<?> parent)
	{
		if ((parent.getChildren() != null) && !parent.getChildren().isEmpty())
		{
			for (final SimpleTag iterable_element : parent.getChildren())
			{
				final WicketField<?> field = (WicketField<?>)iterable_element;
				final Component c = parent.getComponent();
				if (c instanceof MarkupContainer)
				{
					final MarkupContainer mc = (MarkupContainer)c;
					mc.add(field.getComponent());
				}
				addChildComponent(field);
			}
		}
	}
900812
public PolylineMarkers addPolylineToMapAsMarkers(GoogleMap map,
                                                     PolylineOptions polylineOptions,
                                                     MarkerOptions polylineMarkerOptions,
                                                     PolylineOptions globalPolylineOptions) {

        PolylineMarkers polylineMarkers = new PolylineMarkers(this);

        if (globalPolylineOptions != null) {
            polylineOptions.color(globalPolylineOptions.getColor());
            polylineOptions.geodesic(globalPolylineOptions.isGeodesic());
            polylineOptions.visible(globalPolylineOptions.isVisible());
            polylineOptions.zIndex(globalPolylineOptions.getZIndex());
            polylineOptions.width(globalPolylineOptions.getWidth());
        }

        Polyline polyline = addPolylineToMap(map, polylineOptions);
        polylineMarkers.setPolyline(polyline);

        List<Marker> markers = addPointsToMapAsMarkers(map,
                polylineOptions.getPoints(), polylineMarkerOptions, false);
        polylineMarkers.setMarkers(markers);

        return polylineMarkers;
    }
17846
def marker(self, lat, long, text, color=None, icon=None):
        
        try:
            self.dsmap = self._marker(lat, long, text, self.dsmap, color, icon)
            return self.dsmap
        except Exception as e:
            self.err(e, self.marker, "Can not get marker")
1320858
@Override
	protected void addOverlays() {
		super.addOverlays();

		final Context context = getActivity();

		/* Itemized Overlay */
		final ItemizedOverlayWithFocus<OverlayItem> iconOverlay;
		{
			/* Create a static ItemizedOverlay showing some Markers on various cities. */
			final ArrayList<OverlayItem> items = new ArrayList<>();
               for (int i=0; i < 5000; i++){
                    double random_lon= MapView.getTileSystem().getRandomLongitude(Math.random());
                    double random_lat = MapView.getTileSystem().getRandomLatitude(Math.random());
                         items.add(new OverlayItem("A random point", "SampleDescription", new GeoPoint(random_lat,
                                   random_lon))); 
               }
			items.add(new OverlayItem("Berlin", "This is a relatively short SampleDescription.",
					new GeoPoint(52.518333, 13.408333))); // Berlin
			items.add(new OverlayItem(
					"Washington",
					"This SampleDescription is a pretty long one. Almost as long as a the great wall in china.",
					new GeoPoint(38.895000, -77.036667))); // Washington
			items.add(new OverlayItem("San Francisco", "SampleDescription", new GeoPoint(37.779300,
					-122.419200))); // San Francisco

			/* OnTapListener for the Markers, shows a simple Toast. */
			iconOverlay = new ItemizedOverlayWithFocus<>(items,
					new ItemizedIconOverlay.OnItemGestureListener<OverlayItem>() {
						@Override
						public boolean onItemSingleTapUp(final int index, final OverlayItem item) {
							Toast.makeText(
									context,
									"Item '" + item.getTitle() + "' (index=" + index
											+ ") got single tapped up", Toast.LENGTH_LONG).show();
							return true;
						}

						@Override
						public boolean onItemLongPress(final int index, final OverlayItem item) {
							Toast.makeText(
									context,
									"Item '" + item.getTitle() + "' (index=" + index
											+ ") got long pressed", Toast.LENGTH_LONG).show();
							return true;
						}
					}, context);
			iconOverlay.setFocusItemsOnTap(true);
			iconOverlay.setFocusedItem(0);

			mMapView.getOverlays().add(iconOverlay);

			final RotationGestureOverlay mRotationGestureOverlay;
			mRotationGestureOverlay = new RotationGestureOverlay(mMapView);
			mRotationGestureOverlay.setEnabled(false);
			mMapView.getOverlays().add(mRotationGestureOverlay);
		}

		final RotationGestureOverlay rotationGestureOverlay = new RotationGestureOverlay(mMapView);
		rotationGestureOverlay.setEnabled(true);
		mMapView.getOverlays().add(rotationGestureOverlay);

		// Zoom and center on the focused item.
		mMapView.getController().setZoom(5.);
        IGeoPoint geoPoint = iconOverlay.getFocusedItem().getPoint();
		mMapView.getController().animateTo(geoPoint);

	}
233370
def _add_markers(self, markers, tar, files_in_layers, added_symlinks):
        

        if markers:
            self.log.debug("Marker files to add: %s" %
                           [o.name for o in markers.keys()])
        else:
            # No marker files to add
            return

        # https://github.com/goldmann/docker-squash/issues/108
        # Some tar archives do have the filenames prefixed with './'
        # which does not have any effect when we unpack the tar achive,
        # but when processing tar content - we see this.
        tar_files = [self._normalize_path(x) for x in tar.getnames()]

        for marker, marker_file in six.iteritems(markers):
            actual_file = marker.name.replace('.wh.', '')
            normalized_file = self._normalize_path(actual_file)

            should_be_added_back = False

            if self._file_should_be_skipped(normalized_file, added_symlinks):
                self.log.debug(
                    "Skipping '%s' marker file, this file is on a symlink path" % normalized_file)
                continue

            if normalized_file in tar_files:
                self.log.debug(
                    "Skipping '%s' marker file, this file was added earlier for some reason..." % normalized_file)
                continue

            if files_in_layers:
                for files in files_in_layers.values():
                    if normalized_file in files:
                        should_be_added_back = True
                        break
            else:
                # There are no previous layers, so we need to add it back
                # In fact this shouldn't happen since having a marker file
                # where there is no previous layer does not make sense.
                should_be_added_back = True

            if should_be_added_back:
                self.log.debug(
                    "Adding '%s' marker file back..." % marker.name)
                # Marker files on AUFS are hardlinks, we need to create
                # regular files, therefore we need to recreate the tarinfo
                # object
                tar.addfile(tarfile.TarInfo(name=marker.name), marker_file)
                # Add the file name to the list too to avoid re-reading all files
                # in tar archive
                tar_files.append(normalized_file)
            else:
                self.log.debug(
                    "Skipping '%s' marker file..." % marker.name)
1141672
public static void addMarkerAsPolygon(Marker marker, List<Marker> markers) {
        LatLng position = marker.getPosition();
        int insertLocation = markers.size();
        if (markers.size() > 2) {
            double[] distances = new double[markers.size()];
            insertLocation = 0;
            distances[0] = SphericalUtil.computeDistanceBetween(position,
                    markers.get(0).getPosition());
            for (int i = 1; i < markers.size(); i++) {
                distances[i] = SphericalUtil.computeDistanceBetween(position,
                        markers.get(i).getPosition());
                if (distances[i] < distances[insertLocation]) {
                    insertLocation = i;
                }
            }

            int beforeLocation = insertLocation > 0 ? insertLocation - 1
                    : distances.length - 1;
            int afterLocation = insertLocation < distances.length - 1 ? insertLocation + 1
                    : 0;

            if (distances[beforeLocation] > distances[afterLocation]) {
                insertLocation = afterLocation;
            }

        }
        markers.add(insertLocation, marker);
    }
105620
def set_marker_color(self, color='#3ea0e4', edgecolor='k'):
        
        # TODO allow a colour set per another variable
        self._marker_color = color
        self._edge_color = edgecolor
1333830
private void expandBoundingBoxMarkers(BoundingBox boundingBox,
                                          List<Marker> markers) {
        for (Marker marker : markers) {
            expandBoundingBox(boundingBox, marker.getPosition());
        }
    }
854031
public void addMarker(String tag) {
        if (MarkerLog.ENABLED) {
            mEventLog.add(tag, Thread.currentThread().getId());
        }
    }
22059
function(marker) {
		marker.addTo(this._el.marker_item_container);
		marker.on('markerclick', this._onMarkerClick, this);
		marker.on('added', this._onMarkerAdded, this);
	}
356292
def _make_marker_token(self, type_):
        """"""
        tok = Token(type_,
                    '',
                    self.line,
                    self.line_num,
                    self.start,
                    self.start)
        return tok