Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(geo_map): icons for GPX waypoints
Elian Doran41b0f2742006
diff --git a/apps/client/src/types-lib.d.ts b/apps/client/src/types-lib.d.tsindex c72a6216ca..0c4474e946 100644--- a/apps/client/src/types-lib.d.ts+++ b/apps/client/src/types-lib.d.ts@@ -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 {diff --git a/apps/client/src/widgets/type_widgets/geo_map.ts b/apps/client/src/widgets/type_widgets/geo_map.tsindex bdedcc52e1..81e1712a07 100644--- a/apps/client/src/widgets/type_widgets/geo_map.ts+++ b/apps/client/src/widgets/type_widgets/geo_map.ts@@ -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);diff --git a/docs/Release Notes/Release Notes/v0.94.0.md b/docs/Release Notes/Release Notes/v0.94.0.mdindex 67652f9ebd..ebefb5954a 100644--- a/docs/Release Notes/Release Notes/v0.94.0.md+++ b/docs/Release Notes/Release Notes/v0.94.0.md@@ -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