---
title: "SVGAngle | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface SVGAngle

The **`SVGAngle`** interface is used to represent a value that can be an or value.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle)

interface SVGAngle {  
    [SVG\_ANGLETYPE\_DEG](#svg_angletype_deg): 2;  
    [SVG\_ANGLETYPE\_GRAD](#svg_angletype_grad): 4;  
    [SVG\_ANGLETYPE\_RAD](#svg_angletype_rad): 3;  
    [SVG\_ANGLETYPE\_UNKNOWN](#svg_angletype_unknown): 0;  
    [SVG\_ANGLETYPE\_UNSPECIFIED](#svg_angletype_unspecified): 1;  
    [unitType](#unittype): number;  
    [value](#value): number;  
    [valueAsString](#valueasstring): string;  
    [valueInSpecifiedUnits](#valueinspecifiedunits): number;  
    [convertToSpecifiedUnits](#converttospecifiedunits-1)(unitType: number): void;  
    [newValueSpecifiedUnits](#newvaluespecifiedunits-1)(  
        unitType: number,  
        valueInSpecifiedUnits: number,  
    ): void;  
}

##### Index

### Properties[](#properties)

[SVG\_ANGLETYPE\_DEG](#svg_angletype_deg) [SVG\_ANGLETYPE\_GRAD](#svg_angletype_grad) [SVG\_ANGLETYPE\_RAD](#svg_angletype_rad) [SVG\_ANGLETYPE\_UNKNOWN](#svg_angletype_unknown) [SVG\_ANGLETYPE\_UNSPECIFIED](#svg_angletype_unspecified) [unitType](#unittype) [value](#value) [valueAsString](#valueasstring) [valueInSpecifiedUnits](#valueinspecifiedunits)

### Methods[](#methods)

[convertToSpecifiedUnits](#converttospecifiedunits) [newValueSpecifiedUnits](#newvaluespecifiedunits)

## Properties[](#properties-1)

### `Readonly`SVG\_ANGLETYPE\_DEG[](#svg_angletype_deg)

SVG\_ANGLETYPE\_DEG: 2

### `Readonly`SVG\_ANGLETYPE\_GRAD[](#svg_angletype_grad)

SVG\_ANGLETYPE\_GRAD: 4

### `Readonly`SVG\_ANGLETYPE\_RAD[](#svg_angletype_rad)

SVG\_ANGLETYPE\_RAD: 3

### `Readonly`SVG\_ANGLETYPE\_UNKNOWN[](#svg_angletype_unknown)

SVG\_ANGLETYPE\_UNKNOWN: 0

### `Readonly`SVG\_ANGLETYPE\_UNSPECIFIED[](#svg_angletype_unspecified)

SVG\_ANGLETYPE\_UNSPECIFIED: 1

### `Readonly`unitType[](#unittype)

unitType: number

The **`unitType`** property of the SVGAngle interface is one of the unit type constants and represents the units in which this angle's value is expressed.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/unitType)

### value[](#value)

value: number

The **`value`** property of the SVGAngle interface represents the floating point value of the in degrees.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/value)

### valueAsString[](#valueasstring)

valueAsString: string

The **`valueAsString`** property of the SVGAngle interface represents the angle's value as a string, in the units expressed by unitType.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/valueAsString)

### valueInSpecifiedUnits[](#valueinspecifiedunits)

valueInSpecifiedUnits: number

The **`valueInSpecifiedUnits`** property of the SVGAngle interface represents the value of this angle as a number, in the units expressed by the angle's unitType.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/valueInSpecifiedUnits)

## Methods[](#methods-1)

### convertToSpecifiedUnits[](#converttospecifiedunits)

-   convertToSpecifiedUnits(unitType: number): void[](#converttospecifiedunits-1)
    
    The **`convertToSpecifiedUnits()`** method of the SVGAngle interface allows you to convert the angle's value to the specified unit type.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/convertToSpecifiedUnits)
    
    #### Parameters
    
    -   unitType: number
    
    #### Returns void
    

### newValueSpecifiedUnits[](#newvaluespecifiedunits)

-   newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void[](#newvaluespecifiedunits-1)
    
    The **`newValueSpecifiedUnits()`** method of the SVGAngle interface sets the value to a number with an associated unitType, thereby replacing the values for all of the attributes on the object.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGAngle/newValueSpecifiedUnits)
    
    #### Parameters
    
    -   unitType: number
    -   valueInSpecifiedUnits: number
    
    #### Returns void
