new Profile( [options])
Parameters:
Name | Type | Argument | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Properties
|
Fires:
- event:over
- event:out
- event:show
- event:dragstart
- event:dragging
- event:dragend
- event:dragcancel
Extends
Members
-
info
-
Custom infos list
Methods
-
getImage(type, encoderOptions)
-
Get profile image
Parameters:
Name Type Description type
string | undefined image format or 'canvas' to get the canvas image, default image/png.
encoderOptions
Number | undefined between 0 and 1 indicating image quality image/jpeg or image/webp, default 0.92.
Returns:
requested data uri
- Type
- string
-
getSelection(starting, ending)
-
Get selection
Parameters:
Name Type Description starting
number point
ending
number point
Returns:
- Type
- Array.<ol.coordinate>
-
hide()
-
Hide panel
-
isShown()
-
Is panel visible
-
onMove()
-
Mouse move over canvas
-
pointAtTime(time)
-
Get the point at a given time on the profile
Parameters:
Name Type Description time
number time at which to show the point
Returns:
current point
- Type
- ol.coordinates
-
popup(info)
-
Show popup info
Parameters:
Name Type Description info
string to display as a popup
-
refresh()
-
Refresh the profile
-
setGeometry(f [, options])
-
Set the geometry to draw the profile.
Parameters:
Name Type Argument Description f
ol.Feature | ol.geom.Geometry the feature.
options
Object <optional>
Properties
Name Type Argument Default Description projection
ol.ProjectionLike <optional>
feature projection, default projection of the map
zunit
string <optional>
'm' 'm' or 'km', default m
unit
string <optional>
'km' 'm' or 'km', default km
zmin
Number | undefined <optional>
0 default 0
zmax
Number | undefined default max Z of the feature
zDigits
integer | undefined <optional>
0 number of digits for z graduation, default 0
zMaxChars
integer | undefined <optional>
maximum number of chars to be used for z graduation before switching to scientific notation
graduation
Number | undefined <optional>
100 z graduation default 100
amplitude
integer | undefined <optional>
amplitude of the altitude, default zmax-zmin
-
show()
-
Show panel
-
showAt(where)
-
Show point at coordinate or a distance on the profile
Parameters:
Name Type Description where
ol.coordinates | number a coordinate or a distance from begining, if none it will hide the point
Returns:
current point
- Type
- ol.coordinates
-
showAtTime(time, delta)
-
Show point at a time on the profile
Parameters:
Name Type Description time
Date | number a Date or a DateTime (in s) to show the profile on, if none it will hide the point
delta
booelan true if time is a delta from the start, default false
Returns:
current point
- Type
- ol.coordinates
-
toggle()
-
Toggle panel