-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
64a21a2
commit fe5ba6e
Showing
2 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Sticky Note Map(Basic Sample)</title> | ||
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0" /> | ||
|
||
<!-- MapLibre GL JS --> | ||
<script src='https://unpkg.com/maplibre-gl@3.3.1/dist/maplibre-gl.js'></script> | ||
<link href='https://unpkg.com/maplibre-gl@3.3.1/dist/maplibre-gl.css' rel='stylesheet' /> | ||
|
||
<!-- Sticky Note Map --> | ||
<script src="https://office-shirado.github.io/sticky_note_map/src/0.02/Sticky_Note_Map.js"></script> | ||
<link rel="stylesheet" href="https://office-shirado.github.io/sticky_note_map/src/0.02/Sticky_Note_Map.css" type="text/css" /> | ||
|
||
<style type="text/css"> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
html, | ||
body, | ||
#map { | ||
height: 100%; | ||
} | ||
</style> | ||
|
||
</head> | ||
|
||
<body> | ||
<div id="map"></div> | ||
</div> | ||
|
||
<script> | ||
var map = new maplibregl.Map({ | ||
container: 'map', | ||
style: 'https://tile.openstreetmap.jp/styles/osm-bright-ja/style.json', // 地図のスタイル | ||
center: [139.68786, 35.68355], // 中心座標 | ||
zoom: 1, // ズームレベル | ||
}); | ||
|
||
// Sticky Note Map追加 | ||
map.on('load', function () { | ||
Sticky_Note_Map_Language = "jp"; // 言語指定(デフォルト:英語、jp:日本語) | ||
add_Sticky_Note_Map(); | ||
|
||
// 現在地取得 | ||
ZoomLv = map.getZoom(); | ||
//初期ズームレベルの時は、現在地ジャンプ | ||
if (ZoomLv == 1){ | ||
// 1.0秒遅延してジャンプ | ||
setTimeout( | ||
function(){ | ||
navigator.geolocation.getCurrentPosition(Sticky_Note_Map_Flyto_Location); // Sticky_Note_Map関数 | ||
},1000 | ||
); | ||
} | ||
|
||
|
||
}); | ||
|
||
// ダブルクリックズーム制御 | ||
map.doubleClickZoom.disable(); | ||
|
||
|
||
|
||
|
||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Sticky Note Map(Most Simple Sample)</title> | ||
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0" /> | ||
|
||
<!-- MapLibre GL JS --> | ||
<script src='https://unpkg.com/maplibre-gl@3.3.1/dist/maplibre-gl.js'></script> | ||
<link href='https://unpkg.com/maplibre-gl@3.3.1/dist/maplibre-gl.css' rel='stylesheet' /> | ||
|
||
<!-- Sticky Note Map --> | ||
<script src="https://office-shirado.github.io/sticky_note_map/src/0.02/Sticky_Note_Map.js"></script> | ||
<link rel="stylesheet" href="https://office-shirado.github.io/sticky_note_map/src/0.02/Sticky_Note_Map.css" type="text/css" /> | ||
|
||
<style type="text/css"> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
html, | ||
body, | ||
#map { | ||
height: 100%; | ||
} | ||
</style> | ||
|
||
</head> | ||
|
||
<body> | ||
<div id="map"></div> | ||
</div> | ||
|
||
<script> | ||
var map = new maplibregl.Map({ | ||
container: 'map', | ||
style: 'https://tile.openstreetmap.jp/styles/osm-bright-ja/style.json', // 地図のスタイル | ||
center: [139.68786, 35.68355], // 中心座標 | ||
zoom: 1, // ズームレベル | ||
}); | ||
|
||
// Sticky Note Map追加 | ||
map.on('load', function () { | ||
add_Sticky_Note_Map(); | ||
}); | ||
|
||
// ダブルクリックズーム制御 | ||
map.doubleClickZoom.disable(); | ||
|
||
|
||
|
||
|
||
</script> | ||
|
||
</body> | ||
</html> |