APIMethod: addMarker

Parameters:
marker - {<OpenLayers.Marker>}
541925
function(marker) {
        this.markers.push(marker);

        if (this.opacity < 1) {
            marker.setOpacity(this.opacity);
        }

        if (this.map && this.map.getExtent()) {
            marker.map = this.map;
            this.drawMarker(marker);
        }
    }
22059
function(marker) {
		marker.addTo(this._el.marker_item_container);
		marker.on('markerclick', this._onMarkerClick, this);
		marker.on('added', this._onMarkerAdded, this);
	}
696372
public static Marker addLatLngToMap(MapView map, GeoPoint latLng,
                                        MarkerOptions options) {
        Marker m = new Marker(map);
        m.setPosition(latLng);
        if (options!=null) {
            if (options.getIcon()!=null){
                m.setIcon(options.getIcon());
            }
            m.setAlpha(options.getAlpha());
            m.setTitle(options.getTitle());
            m.setSubDescription(options.getSubdescription());
            m.setInfoWindow(new BasicInfoWindow(R.layout.bonuspack_bubble, map));
        }
        map.getOverlayManager().add(m);
        return m;
    }
367996
function() {
    var center = this._shape.getLatLng();

    //this._moveMarker.setLatLng(center);
    this._resizeMarkers[0].setLatLng(this._getResizeMarkerPoint(center));

    // show resize marker
    this._shape._map.addLayer(this._markerGroup);
    this._updateMoveMarker();
    this._fireEdit();
  }
687141
function (markerUrl, markerWidth, markerHeight) {
			this.writeDebug('markerImage',arguments);
			var markerImg;

			// User defined marker dimensions
			if (typeof markerWidth !== 'undefined' && typeof markerHeight !== 'undefined') {
				markerImg = {
					url: markerUrl,
					size: new google.maps.Size(markerWidth, markerHeight),
					scaledSize: new google.maps.Size(markerWidth, markerHeight)
				};
			}
			// Default marker dimensions: 32px x 32px
			else {
				markerImg = {
					url: markerUrl,
					size: new google.maps.Size(32, 32),
					scaledSize: new google.maps.Size(32, 32)
				};
			}

			return markerImg;
		}
97416
public void markAnnotation(String annotation, int lineno, int charno) {
    JSDocInfo.Marker marker = currentInfo.addMarker();

    if (marker != null) {
      JSDocInfo.TrimmedStringPosition position =
          new JSDocInfo.TrimmedStringPosition();
      position.setItem(annotation);
      position.setPositionInformation(lineno, charno, lineno,
          charno + annotation.length());
      marker.setAnnotation(position);
      populated = true;
    }

    currentMarker = marker;
  }
527299
function (options) {
            google.maps.Marker.prototype.setMap.apply(this, [options]);
            (this.MarkerLabel) && this.MarkerLabel.setMap.apply(this.MarkerLabel, [options]);
        }
1257862
public <R extends RequestQueue> R addMarker(String tag, Object... args) {
        Marker marker = new Marker(tag,
                Thread.currentThread().getId(),
                Thread.currentThread().getName(),
                System.nanoTime());
        for (RequestListener.MarkerListener markerListener : markerListeners) {
            markerListener.onMarker(marker, args);
        }
        return (R) this;
    }
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);
        }
    }
675670
function(walk, openMarker, closeMarker, emitter) {
    if (!walk.at(openMarker))
      return false;
    walk.skip(openMarker.length);
    var end = walk.indexOf(closeMarker);
    if (end === null) {
      // just emit the open marker
      this.out.push(openMarker);
    } else {
      // delegate rendering of subarea to emitter
      var w = new SubWalker(walk, walk.position, end);
      emitter.call(this, w);
      walk.startFrom(end + closeMarker.length);
    }
    return true;
  }
165641
function(marker, type) {
        marker = $(marker);

        // Stop all the unnecessary processing
        if (type === 'activate' && marker.hasClass('is-stalked')) {
            return;
        } else if (type === 'deactivate' && !marker.hasClass('is-stalked')) {
            return;
        }

        var options = this.options,
            targetBy = options.targetBy,
            markBy = options.markBy,
            target = this.targets.filter(function() {
                return $(this).attr(targetBy).replace('#', '') === marker.attr(markBy);
            }),
            before,
            after,
            method;

        if (type === 'activate') {
            before = 'activating';
            after = 'activated';
            method = 'addClass';
        } else {
            before = 'deactivating';
            after = 'deactivated';
            method = 'removeClass';
        }

        this.fireEvent(before, [marker, target]);

        marker[method]('is-stalked');
        target[method]('is-active');

        this.fireEvent(after, [marker, target]);
    }
1201061
private void addMarkerAnnotation() {

    if (isLog(4)) {
      log("... adding marker annotation");
    }
    AnnotationVisitor av = cv.visitAnnotation(ANNOTATION_ALREADY_ENHANCED_MARKER, true);
    if (av != null) {
      av.visitEnd();
    }
  }
1002745
public void add(ShapeMarkers shapeMarkers) {
        for (Marker marker : shapeMarkers.getMarkers()) {
            add(marker, shapeMarkers);
        }
    }
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);

	}
1307964
def update_marker(self, iid, **kwargs):
        
        if iid not in self._markers:
            raise ValueError("Unknown iid passed as argument: {}".format(iid))
        self.check_kwargs(kwargs)
        marker = self._markers[iid]
        marker.update(kwargs)
        self.delete_marker(iid)
        return self.create_marker(marker["category"], marker["start"], marker["finish"], marker)
1103051
public <R extends RequestQueue> R removeQueueMarkerListener(RequestListener.MarkerListener
                                                                   markerListener) {
        synchronized (markerListeners) {
            this.markerListeners.remove(markerListener);
        }
        return (R) this;
    }
397004
Marker addMarker() {
    if (!lazyInitDocumentation()) {
      return null;
    }

    if (documentation.markers == null) {
      documentation.markers = new ArrayList<>();
    }

    Marker marker = new Marker();
    documentation.markers.add(marker);
    return marker;
  }