Constructor
new maptalks_CurvedLabel(arg1_optionsopt)
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Array.<Array.<number>>
|
Array.<maptalks.Coordinate>
|
||||||||||||||||||||||||||||||||
arg1_options |
Object
|
<optional> |
|
Methods
getSmoothPoints(arg0_coords, arg1_samples_per_segmentopt) → {Array.<Array.<number>>}
Returns smoothed points between coords for arc curves.
- Method of: Geospatiale.maptalks_CurvedLabel
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
arg0_coords |
Array.<Array.<number>>
|
|||
arg1_samples_per_segment |
<optional> |
25 |
measureTextWidth(arg0_text, arg1_font_size) → {number}
Measures actual text width using a <canvas> to assess kerning.
- Method of: Geospatiale.maptalks_CurvedLabel
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_text |
string
|
|
arg1_font_size |
number
|
Returns:
- Type:
-
number
remove()
Removes the maptalks_CurvedLabel geometry from the map.
- Method of: Geospatiale.maptalks_CurvedLabel
render()
Renders the maptalks_CurvedLabel geometry to the map.
- Method of: Geospatiale.maptalks_CurvedLabel
setCoordinates(arg0_coords)
Sets coordinates for the maptalks_CurvedLabel geometry.
- Method of: Geospatiale.maptalks_CurvedLabel
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_coords |
Array.<Array.<number>>
|
setFontSize(arg0_size)
Sets the font size for the maptalks_CurvedLabel geometry.
- Method of: Geospatiale.maptalks_CurvedLabel
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_size |
number
|
setText(arg0_text)
Sets the new text for the maptalks_CurvedLabel geometry.
- Method of: Geospatiale.maptalks_CurvedLabel
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_text |
string
|
toJSON() → {Object}
Exports class to JSON.
- Method of: Geospatiale.maptalks_CurvedLabel
Returns:
- Type:
-
Object
updateZoom()
Internal helper function to refresh zoom.
- Method of: Geospatiale.maptalks_CurvedLabel
(static) fromJSON(arg0_map, arg1_json) → {Geospatiale.maptalks_CurvedLabel}
Creates a new maptalks_CurvedLabel geometry from JSON.
- Static method of: Geospatiale.maptalks_CurvedLabel
Parameters:
| Name | Type | Description |
|---|---|---|
arg0_map |
maptalks.Map
|
|
arg1_json |
Object
|
string
|