|
2 | 2 | <head>
|
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
4 | 4 | <link rel="apple-touch-icon" href="apple-touch-icon.png" />
|
5 |
| -<title>緯度経度地図 - egmapjs</title> |
6 |
| -<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> |
| 5 | +<title>緯度経度表示 - egmapjs</title> |
| 6 | +<meta name="viewport" content="width=device-width"/> |
7 | 7 | <link rel=" stylesheet" href=" https://unpkg.com/[email protected]/dist/leaflet.css" integrity=" sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" crossorigin="" />
|
8 | 8 | <script src=" https://unpkg.com/[email protected]/dist/leaflet.js" integrity=" sha512-QVftwZFqvtRNi0ZyCtsznlKSWOStnDORoefr1enyq5mVL4tmKB3S/EnC3rRJcxCPavG10IcrVGSmPh6Qw5lwrg==" crossorigin="" ></script>
|
9 |
| - |
| 9 | +<link rel="stylesheet" href="https://code4fukui.github.io/egmapjs/egmap.css"/> |
10 | 10 | <script src="https://code4fukui.github.io/egmapjs/egmap.js"></script>
|
11 | 11 | <script src="https://fukuno.jig.jp/fukuno.js"></script>
|
12 | 12 | <script>"use strict"
|
|
22 | 22 | iconRetinaUrl: 'crosshairs.png',
|
23 | 23 | iconSize: [ 35, 35 ],
|
24 | 24 | iconAnchor: [ 17, 17 ],
|
25 |
| - }); |
26 |
| - const crosshair = new L.marker(map.getCenter(), { icon: iconcenter, clickable:false }) |
| 25 | + }) |
| 26 | + const crosshair = new L.marker(map.getCenter(), { icon: iconcenter, clickable: false }) |
27 | 27 | crosshair.addTo(map);
|
28 | 28 | map.on('move', function() {
|
29 | 29 | crosshair.setLatLng(map.getCenter());
|
30 |
| - }); |
| 30 | + }) |
31 | 31 |
|
32 | 32 | var showLL = function() {
|
33 | 33 | var ll = map.getCenter()
|
34 |
| - tfll.value = fixfloat(ll.lat, 6) + "," + fixfloat(ll.lng, 6) |
| 34 | + const sep = chktab.checked ? "\t" : "," |
| 35 | + tfll.value = fixfloat(ll.lat, 6) + sep + fixfloat(ll.lng, 6) |
35 | 36 | }
|
36 | 37 | showLL()
|
37 | 38 | map.on("move", showLL)
|
38 |
| - |
| 39 | + chktab.onchange = showLL |
39 | 40 | }
|
40 | 41 | </script>
|
41 | 42 | <style>
|
|
49 | 50 | color: gray !important;
|
50 | 51 | }
|
51 | 52 | h1 {
|
52 |
| - font-size: 3vh; |
53 |
| - margin: 0; |
| 53 | + font-size: 3.5vh; |
| 54 | + margin: 0.5vh; |
54 | 55 | }
|
55 | 56 | #sub {
|
56 | 57 | font-size: 4vw;
|
57 | 58 | }
|
58 | 59 | #mapid {
|
59 |
| - height: 80vh; |
60 |
| -} |
61 |
| -.leaflet-tile-container { /* 地図の色味変更 CSS3 filter */ |
62 |
| - x-filter: sepia(100%) brightness(95%); /* セピア */ |
63 |
| - x-filter: grayscale(100%) brightness(110%); /* 明るめグレースケール */ |
64 |
| - filter: hue-rotate(-10deg) saturate(70%) brightness(104%); /* いい感じの色? */ |
65 |
| -} |
66 |
| -.leaflet-marker-pane > a { |
67 |
| - word-break: break-all; |
| 60 | + height: 75vh; |
68 | 61 | }
|
69 | 62 | #tfll {
|
70 | 63 | box-sizing: border-box;
|
71 | 64 | text-align: center;
|
72 | 65 | font-size: 120%;
|
73 |
| - width: 100%; |
| 66 | + width: 90%; |
74 | 67 | border: 1px solid gray;
|
75 | 68 | }
|
| 69 | +#tfllbox { |
| 70 | + text-align: left; |
| 71 | +} |
| 72 | +#spantab { |
| 73 | + box-sizing: border-box; |
| 74 | + text-align: center; |
| 75 | + font-size: 120%; |
| 76 | + width: 10%; |
| 77 | + padding: 0px 5px; |
| 78 | + x-border: 1px solid gray; |
| 79 | +} |
76 | 80 | .credit {
|
77 | 81 | margin-top: 1vh;
|
78 | 82 | font-size: 90%;
|
79 | 83 | }
|
| 84 | +#debug { |
| 85 | + text-align: left; |
| 86 | +} |
80 | 87 | </style>
|
81 | 88 |
|
82 | 89 | </Head>
|
83 | 90 | <body>
|
84 |
| -<h1>緯度経度地図 - egmapjs</h1> |
| 91 | +<h1>緯度経度表示 - egmapjs</h1> |
85 | 92 | <div id="mapid"></div>
|
86 |
| -<input type=text id="tfll"> |
| 93 | +<div id=tfllbox><input type=text id="tfll"><label id=spantab><input type=checkbox id=chktab>タブ</label></div> |
87 | 94 |
|
88 | 95 | <div class=credit>
|
89 |
| -App: <a href=http://fukuno.jig.jp/2364>緯度経度地図</a> CC BY fukuno.jig.jp, |
90 |
| -Lib: <a href=http://fukuno.jig.jp/2363>egmapjs</a> CC BY fukuno.jig.jp (<a href=https://github.com/code4fukui/egmapjs>src on GitHub</a>)<br> |
91 |
| -ご要望は「<a href=https://www.facebook.com/taisuke.fukuno/posts/10158114309768626>こちら</a>」までお気軽にお寄せください<br> |
| 96 | +App: <a href=https://fukuno.jig.jp/2369>緯度経度地図</a> CC BY fukuno.jig.jp<br> |
| 97 | +Lib: <a href=https://fukuno.jig.jp/2363>egmapjs</a> CC BY fukuno.jig.jp (<a href=https://github.com/code4fukui/egmapjs>src on GitHub</a>)<br> |
92 | 98 | </div>
|
93 | 99 |
|
94 | 100 | </body>
|
|
0 commit comments