javalent / obsidian-leaflet

Adds interactive maps to Obsidian.md using Leaflet.js
481 stars 29 forks source link

fix: latidude and longitude can be set (closes #373) #374

Closed Sirs0ri closed 1 year ago

Sirs0ri commented 1 year ago

This fixes the inverted NaN-check to see if coordinates are valid, and makes the logic for choosing coodrinates or defaults a bit more robust. They can now fail independently of each other, so that an error in lat doesn't prevent long from being set.

I've tested the code locally and it "works on my machine".

The zh_CN translations still need to be adjusted slightly, for now I'm still using the old warning that didn't differentiate between lat/long. - @Wanxp could you maybe help me here since you did the initial translations? I'd appreciate if you could e.g. send me the two new strings, then I could finalise the PR.

valentine195 commented 1 year ago

Everything looks good... once the translation is done I will merge, thanks.

valentine195 commented 1 year ago

Sorry, we can fix translation later.

Wanxp commented 1 year ago

ok. I am working now.

PS: Okay, please feel free to let me know if you need any further assistance with translation. I will do my best to provide translation functionality.