fix(geo_map): icons for GPX waypoints

This commit is contained in:
Elian Doran 2025-06-01 15:45:15 +03:00
parent 4509ef62b5
commit 41b0f27420
No known key found for this signature in database
3 changed files with 8 additions and 4 deletions

View File

@ -39,12 +39,12 @@ declare module "leaflet" {
startIcon?: DivIcon | Icon | string | undefined;
endIcon?: DivIcon | Icon | string | undefined;
wptIcons?: {
[key: string]: Icon | string;
[key: string]: DivIcon | Icon | string;
};
wptTypeIcons?: {
[key: string]: Icon | string;
[key: string]: DivIcon | Icon | string;
};
pointMatchers?: Array<{ regex: RegExp; icon: Icon | string}>;
pointMatchers?: Array<{ regex: RegExp; icon: DivIcon | Icon | string}>;
}
interface GPXOptions {

View File

@ -235,7 +235,10 @@ export default class GeoMapTypeWidget extends TypeWidget {
const track = new this.L.GPX(stringResponse, {
markers: {
startIcon: this.#buildIcon(note.getIcon(), note.getColorClass(), note.title),
endIcon: this.#buildIcon("bxs-flag-checkered")
endIcon: this.#buildIcon("bxs-flag-checkered"),
wptIcons: {
"": this.#buildIcon("bx bx-pin")
}
}
});
track.addTo(this.geoMapWidget.map);

View File

@ -28,6 +28,7 @@
* [Unable to handle multi line mathematical formulas when importing markdown](https://github.com/TriliumNext/Notes/pull/1984) by @SiriusXT
* Calendar: became invisible if resizing while not visible
* [GPX track not rendering on geomap note](https://github.com/TriliumNext/Notes/issues/2085)
* [GPX icons not working](https://github.com/TriliumNext/Notes/issues/1772)
## ✨ Improvements