@raruto/leaflet-elevation 1.7.0 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -1
- package/dist/leaflet-elevation.css +1 -0
- package/dist/leaflet-elevation.js +179 -117
- package/dist/leaflet-elevation.js.map +1 -1
- package/dist/leaflet-elevation.min.css +1 -1
- package/dist/leaflet-elevation.min.js +1 -1
- package/dist/leaflet-elevation.min.js.map +1 -1
- package/libs/leaflet-gpxgroup.js +48 -35
- package/libs/leaflet-gpxgroup.min.js +14 -13
- package/package.json +1 -1
- package/src/chart.js +4 -0
- package/src/components.js +6 -0
- package/src/control.js +40 -6
- package/src/index.css +1 -0
- package/src/options.js +9 -16
- package/src/utils.js +34 -20
package/README.md
CHANGED
|
@@ -158,9 +158,22 @@ _For a working example see one of the following demos:_
|
|
|
158
158
|
// Toggle "leaflet-distance-markers" integration
|
|
159
159
|
distanceMarkers: false,
|
|
160
160
|
|
|
161
|
-
// Display track waypoints
|
|
161
|
+
// Display track waypoints: true || "markers" || "dots" || false
|
|
162
162
|
waypoints: true,
|
|
163
163
|
|
|
164
|
+
// Toggle custom waypoint icons: true || { associative array of <sym> tags } || false
|
|
165
|
+
wptIcons: {
|
|
166
|
+
'': L.divIcon({
|
|
167
|
+
className: 'elevation-waypoint-marker',
|
|
168
|
+
html: '<i class="elevation-waypoint-icon"></i>',
|
|
169
|
+
iconSize: [30, 30],
|
|
170
|
+
iconAnchor: [8, 30],
|
|
171
|
+
}),
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
// Toggle waypoint labels
|
|
175
|
+
wptLabels: true,
|
|
176
|
+
|
|
164
177
|
// Render chart profiles as Canvas or SVG Paths
|
|
165
178
|
preferCanvas: true
|
|
166
179
|
|
|
@@ -177,6 +190,52 @@ _For a working example see one of the following demos:_
|
|
|
177
190
|
|
|
178
191
|
</script>
|
|
179
192
|
```
|
|
193
|
+
|
|
194
|
+
### FAQ
|
|
195
|
+
|
|
196
|
+
<details>
|
|
197
|
+
<summary>1. How can I change the color of the elevation plot?</summary><br>
|
|
198
|
+
|
|
199
|
+
There are multiple options to achieve this:
|
|
200
|
+
|
|
201
|
+
* You could either use some default presets (see: theme: "lightblue-theme" option in readme file and the following file `leaflet-elevation.css` for some other default "*-theme" names).
|
|
202
|
+
* check out [this example](https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_custom-theme.html)
|
|
203
|
+
* Or add the following lines for custom colors.
|
|
204
|
+
```css
|
|
205
|
+
.elevation-control.elevation .area {
|
|
206
|
+
fill: red;
|
|
207
|
+
}
|
|
208
|
+
.elevation-control.elevation .background {
|
|
209
|
+
background-color: white;
|
|
210
|
+
```
|
|
211
|
+
</details>
|
|
212
|
+
|
|
213
|
+
<details>
|
|
214
|
+
<summary>2. How to enable/disable the leaflet user interface customizations?</summary><br>
|
|
215
|
+
|
|
216
|
+
These customizations are actually part of the [leaflet-ui](https://github.com/Raruto/leaflet-ui) and can be toggled on/off using e.g. the following options:
|
|
217
|
+
```js
|
|
218
|
+
var map = L.map('map', {
|
|
219
|
+
center: [41.4583, 12.7059], // needs value to initialize
|
|
220
|
+
zoom: 5, // needs value to initialize
|
|
221
|
+
mapTypeId: 'topo',
|
|
222
|
+
mapTypeIds: ['osm', 'terrain', 'satellite', 'topo'],
|
|
223
|
+
gestureHandling: false, // zoom with Cmd + Scroll
|
|
224
|
+
zoomControl: true, // plus minus buttons
|
|
225
|
+
pegmanControl: false,
|
|
226
|
+
locateControl: false,
|
|
227
|
+
fullscreenControl: true,
|
|
228
|
+
layersControl: true,
|
|
229
|
+
minimapControl: false,
|
|
230
|
+
editInOSMControl: false,
|
|
231
|
+
loadingControl: false,
|
|
232
|
+
searchControl: false,
|
|
233
|
+
disableDefaultUI: false,
|
|
234
|
+
printControl: false,
|
|
235
|
+
});
|
|
236
|
+
```
|
|
237
|
+
</details>
|
|
238
|
+
|
|
180
239
|
_Related: [Leaflet-UI presets](https://github.com/raruto/leaflet-ui), [QGIS Integration](https://github.com/faunalia/trackprofile2web)_
|
|
181
240
|
|
|
182
241
|
---
|