Skip to content

Commit

Permalink
mod latlngmap
Browse files Browse the repository at this point in the history
  • Loading branch information
taisukef committed Feb 12, 2019
1 parent 018e108 commit 16943a0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 26 deletions.
3 changes: 3 additions & 0 deletions egmap.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
x-filter: grayscale(100%) brightness(110%); /* 明るめグレースケール */
filter: hue-rotate(-10deg) saturate(70%) brightness(104%); /* いい感じの色? */
}
.leaflet-marker-pane > a {
word-break: break-all;
}
a {
color: #444 !important;
}
56 changes: 31 additions & 25 deletions samples/latlngmap.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
<title>緯度経度地図 - egmapjs</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<title>緯度経度表示 - egmapjs</title>
<meta name="viewport" content="width=device-width"/>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" crossorigin=""/>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-QVftwZFqvtRNi0ZyCtsznlKSWOStnDORoefr1enyq5mVL4tmKB3S/EnC3rRJcxCPavG10IcrVGSmPh6Qw5lwrg==" crossorigin=""></script>

<link rel="stylesheet" href="https://code4fukui.github.io/egmapjs/egmap.css"/>
<script src="https://code4fukui.github.io/egmapjs/egmap.js"></script>
<script src="https://fukuno.jig.jp/fukuno.js"></script>
<script>"use strict"
Expand All @@ -22,20 +22,21 @@
iconRetinaUrl: 'crosshairs.png',
iconSize: [ 35, 35 ],
iconAnchor: [ 17, 17 ],
});
const crosshair = new L.marker(map.getCenter(), { icon: iconcenter, clickable:false })
})
const crosshair = new L.marker(map.getCenter(), { icon: iconcenter, clickable: false })
crosshair.addTo(map);
map.on('move', function() {
crosshair.setLatLng(map.getCenter());
});
})

var showLL = function() {
var ll = map.getCenter()
tfll.value = fixfloat(ll.lat, 6) + "," + fixfloat(ll.lng, 6)
const sep = chktab.checked ? "\t" : ","
tfll.value = fixfloat(ll.lat, 6) + sep + fixfloat(ll.lng, 6)
}
showLL()
map.on("move", showLL)

chktab.onchange = showLL
}
</script>
<style>
Expand All @@ -49,46 +50,51 @@
color: gray !important;
}
h1 {
font-size: 3vh;
margin: 0;
font-size: 3.5vh;
margin: 0.5vh;
}
#sub {
font-size: 4vw;
}
#mapid {
height: 80vh;
}
.leaflet-tile-container { /* 地図の色味変更 CSS3 filter */
x-filter: sepia(100%) brightness(95%); /* セピア */
x-filter: grayscale(100%) brightness(110%); /* 明るめグレースケール */
filter: hue-rotate(-10deg) saturate(70%) brightness(104%); /* いい感じの色? */
}
.leaflet-marker-pane > a {
word-break: break-all;
height: 75vh;
}
#tfll {
box-sizing: border-box;
text-align: center;
font-size: 120%;
width: 100%;
width: 90%;
border: 1px solid gray;
}
#tfllbox {
text-align: left;
}
#spantab {
box-sizing: border-box;
text-align: center;
font-size: 120%;
width: 10%;
padding: 0px 5px;
x-border: 1px solid gray;
}
.credit {
margin-top: 1vh;
font-size: 90%;
}
#debug {
text-align: left;
}
</style>

</Head>
<body>
<h1>緯度経度地図 - egmapjs</h1>
<h1>緯度経度表示 - egmapjs</h1>
<div id="mapid"></div>
<input type=text id="tfll">
<div id=tfllbox><input type=text id="tfll"><label id=spantab><input type=checkbox id=chktab>タブ</label></div>

<div class=credit>
App: <a href=http://fukuno.jig.jp/2364>緯度経度地図</a> CC BY fukuno.jig.jp,
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>
ご要望は「<a href=https://www.facebook.com/taisuke.fukuno/posts/10158114309768626>こちら</a>」までお気軽にお寄せください<br>
App: <a href=https://fukuno.jig.jp/2369>緯度経度地図</a> CC BY fukuno.jig.jp<br>
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>
</div>

</body>
Expand Down
2 changes: 1 addition & 1 deletion tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h3>egmapjs サンプル</h3>
<li><a href=samples/myokorefuge.html>妙高市避難所マップデモ</a></li>
<li><a href=samples/sparqlrefugemap.html>避難所マップ(SPARQL API)</a></li>
<li><a href=samples/localgovjpmap.html>フレーズで探そう日本の地方自治体マップ</a></li>
<li><a href=samples/latlngmap.html>緯度経度マップ</a></li>
<li><a href=samples/latlngmap.html>緯度経度表示</a></li>
</ul>
<hr>
<a href=https://fukuno.jig.jp/2363>egmapjs CC BY fukuno.jig.jp</a><br>
Expand Down

0 comments on commit 16943a0

Please sign in to comment.