Elevation Profile Control
The MapTiler elevation profile control module for MapTiler SDK is a super easy way to show the elevation profile of any GeoJSON trace; whether it’s a
LineString or a
MultiLineString, this trace can be in a
FeatureCollection. If multiple features are eligible in the provided dataset, the features will be concatenated and displayed together as a unique route. MapTiler Cloud fuels the elevation data.
The elevation profile control is customizable in many ways and supports metric and imperial units. It has many built-in defaults and does not need much to look nice!
Install the npm package.
Import the MapTiler elevation profile control
Instantiate the control and add it to a
Mapinstance, most likely inside a map
This reference documents every object and method available. Each section describes classes or objects as well as their properties, parameters, methods, and associated events. Many sections also include inline code examples and related resources.
Sometimes, the route data passed to the method
.setData() will contain only longitude and latitude information but no elevation. In that case, the control will automatically fetch and compute the elevation data before displaying the profile. Under the hood, the MapTiler Client library performs this operation using elevation data from MapTiler Cloud.