Class: QuadBezierCurve

QuadBezierCurve

Quadratic Bezier Curve

new QuadBezierCurve(coordinates) [source]

var curve = new QuadBezierCurve(
    [
        [121.47083767181408,31.214448123476995],
        [121.4751292062378,31.215475523000404],
        [121.47869117980943,31.211916269810335]
    ],
    {
        symbol : {
            'lineWidth' : 5
        }
    }
).addTo(layer);
Parameter Type Description
coordinates Array.<Coordinate> | Array.<Array.<Number>> coordinates of the curve
Extends:

Members

  • (constant) options

  • Inherited From:
    Properties:
    Name Type Default Description
    options opt Object null
    Properties
    Name Type Default Description
    arrowStyle opt String null style of arrow, if not null, arrows will be drawn, possible values: classic
    arrowPlacement opt String vertex-last arrow's placement: vertex-first, vertex-last, vertex-firstlast, point
    symbol Object Path's default symbol
    id opt Boolean null id of the geometry
    visible opt Boolean true whether the geometry is visible.
    editable opt Boolean true whether the geometry can be edited.
    cursor opt String null cursor style when mouseover the geometry, same as the definition in CSS.
    shadowBlur opt Number 0 level of the shadow around the geometry, see MDN's explanation
    shadowColor opt String black color of the shadow around the geometry, a CSS style color
    measure opt String EPSG:4326 the measure code for the geometry, defines measureGeometry how it can be measured.
    draggable opt Boolean false whether the geometry can be dragged.
    dragShadow opt Boolean false if true, during geometry dragging, a shadow will be dragged before geometry was moved.
    dragOnAxis opt Boolean null if set, geometry can only be dragged along the specified axis, possible values: x, y
    Inherited From:
    Source:

    Methods

  • (inherited) setCoordinates(coordinates) [source]

  • Set new coordinates to the line string
    Parameter Type Description
    coordinates Array.<Coordinate> | Array.<Array.<Number>> new coordinates
    Inherited From:
    Fires:
    Returns:
    LineString: this
  • (inherited) getCoordinates() [source]

  • Get coordinates of the line string
    Inherited From:
    Returns:
    Array.<Coordinate>|Array.<Array.<Number>>: coordinates
  • (inherited) getCenterInExtent(extent) [source]

  • Get center of linestring's intersection with give extent
    const extent = map.getExtent();
     const center = line.getCenterInExtent(extent);
    Parameter Type Description
    extent Extent
    Inherited From:
    Returns:
    Coordinate: center, null if line doesn't intersect with extent
  • (inherited) animateShow(optionsopt, cbopt) [source]

  • Show the linestring with animation
    line.animateShow({
       duration : 2000,
       easing : 'linear'
     }, function (frame, currentCoord) {
       //frame is the animation frame
       //currentCoord is current coordinate of animation
     });
    Parameter Type Default Description
    options opt Object null animation options
    Properties
    Parameter Type Default Description
    duration opt Number 1000 duration
    easing opt String out animation easing
    cb opt function null callback function in animation, function parameters: frame, currentCoord
    Inherited From:
    Returns:
    LineString: this