SVGGeometryElement: getPointAtLength() method

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

The SVGGeometryElement.getPointAtLength() method returns the point at a given distance along the path.

Syntax

js
getPointAtLength(distance)

Parameters

distance

A float referring to the distance along the path.

Return value

A DOMPoint indicating the point at a given distance along the path.

Specifications

Specification
Scalable Vector Graphics (SVG) 2
# __svg__SVGGeometryElement__getPointAtLength

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
getPointAtLength
Chrome – Partial support
Chrome 1 – 55 (Release date: 2008-12-11)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Chrome – Full support
Chrome 56 (Release date: 2017-01-25)
footnote Full support
Edge – Partial support
Edge 12 – 18 (Release date: 2015-07-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Partial support
Firefox 1.5 – 60 (Release date: 2005-11-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Firefox – Full support
Firefox 61 (Release date: 2018-06-26)
footnote Full support
Opera – Partial support
Opera 12.1 – 42 (Release date: 2012-11-20)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Opera – Full support
Opera 43 (Release date: 2017-02-07)
footnote Full support
Safari – Partial support
Safari 3 – 11.1 (Release date: 2007-10-26)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Safari – Full support
Safari 12 (Release date: 2018-09-17)
footnote Full support
Chrome Android – Partial support
Chrome Android 18 – 55 (Release date: 2012-06-27)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Chrome Android – Full support
Chrome Android 56 (Release date: 2017-02-01)
footnote Full support
Firefox for Android – Partial support
Firefox for Android 4 – 60 (Release date: 2011-03-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Firefox for Android – Full support
Firefox for Android 61 (Release date: 2018-06-26)
footnote Full support
Opera Android – Partial support
Opera Android 12.1 – 42 (Release date: 2012-10-09)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Opera Android – Full support
Opera Android 43 (Release date: 2017-09-27)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 1 – 11.3 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Safari on iOS – Full support
Safari on iOS 12 (Release date: 2018-09-17)
footnote Full support
Samsung Internet – Partial support
Samsung Internet 1 – 5.4 (Release date: 2013-04-27)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
Samsung Internet – Full support
Samsung Internet 6 (Release date: 2017-08-23)
footnote Full support
WebView Android – Partial support
WebView Android 4.4 – 55 (Release date: 2013-12-09)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
WebView Android – Full support
WebView Android 56 (Release date: 2017-02-01)
footnote Full support
WebView on iOS – Partial support
WebView on iOS 1 – 11.3 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for SVGPathElement, not all SVGGeometryElement objects.
WebView on iOS – Full support
WebView on iOS 12 (Release date: 2018-09-17)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
Has more compatibility info.