Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
office-shirado authored Oct 5, 2024
1 parent 64a21a2 commit fe5ba6e
Showing 2 changed files with 127 additions and 0 deletions.
71 changes: 71 additions & 0 deletions basic/index.html
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>
56 changes: 56 additions & 0 deletions most_simple/index.html
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>

0 comments on commit fe5ba6e

Please sign in to comment.