meshcode2latlng
v1.0.3
Published
メッシュコードから緯度経度に変換するライブラリです。
Downloads
12
Readme
meshcode2latlng
Installation
client side
<script type="text/javascript" src="./lib/meshcode2latlng.js"></script>
<script type="text/javascript">
var loc = meshcode2latlng.first(5339);
// loc => { south: 35.333333333333336,
// west: 139,
// north: 36.00000000000001,
// east: 140 }
</script>
server side
npm install meshcode2latlng
でインストールをします。
const meshcode2latlng = require('meshcode2latlng');
var loc = meshcode2latlng.first(5339);
// loc => { south: 35.333333333333336,
// west: 139,
// north: 36.00000000000001,
// east: 140 }
Description
メッシュコードから緯度経度に変換するライブラリです。(世界測地系 WGS84)
Demo of Google maps api
1次メッシュ
var location = meshcode2latlng.first(5339);
new google.maps.Rectangle({
strokeColor: '#ff0000',
fillColor: '#ff0000',
map: map,
bounds: {
north: location.north,
south: location.south,
west: location.west,
east: location.east
}
});
2次メッシュ
var location = meshcode2latlng.second(533946);
new google.maps.Rectangle({
strokeColor: '#ff0000',
fillColor: '#ff0000',
map: map,
bounds: {
north: location.north,
south: location.south,
west: location.west,
east: location.east
}
});
3次メッシュ
var location = meshcode2latlng.third(53394611);
new google.maps.Rectangle({
strokeColor: '#ff0000',
fillColor: '#ff0000',
map: map,
bounds: {
north: location.north,
south: location.south,
west: location.west,
east: location.east
}
});
1/2メッシュ
var location = meshcode2latlng.half(533946113);
new google.maps.Rectangle({
strokeColor: '#ff0000',
fillColor: '#ff0000',
map: map,
bounds: {
north: location.north,
south: location.south,
west: location.west,
east: location.east
}
});
1/4メッシュ
var location = meshcode2latlng.quater(5339461132);
new google.maps.Rectangle({
strokeColor: '#ff0000',
fillColor: '#ff0000',
map: map,
bounds: {
north: location.north,
south: location.south,
west: location.west,
east: location.east
}
});