Skip to content

Commit e2e5f69

Browse files
Update kyotoishibumimap.html
60進法を10進法に変換するコード修正
1 parent 3302f44 commit e2e5f69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

samples/kyotoishibumimap.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
if (!o.lat || !o.lng)
4343
return
4444
const dms2d = function(dms) {
45-
return (Math.floor(dms) + Math.floor(dms * 100) % 100 / 60 + Math.floor(dms * 10000) % 100 / (60 * 60)).toFixed(5)
45+
// return (Math.floor(dms) + Math.floor(dms * 100) % 100 / 60 + Math.floor(dms * 10000) % 100 / (60 * 60)).toFixed(5)
46+
// 度分秒の秒の小数点以下に対応する修正
47+
return (Math.floor(dms) + Math.floor(dms * 100) % 100 / 60 + Math.floor(dms * 10000) % 100 / (60 * 60) + Math.floor(dms * 1000000) % 100 / (60 * 60 * 100)).toFixed(6)
4648
}
4749
o.lat = dms2d(o.lat)
4850
o.lng = dms2d(o.lng)

0 commit comments

Comments
 (0)