Skip to content

Commit

Permalink
Merge pull request #7 from dayjournal/dev
Browse files Browse the repository at this point in the history
🎉 v6.3.0
  • Loading branch information
dayjournal authored Mar 9, 2021
2 parents d427225 + 9886124 commit 2762f5c
Show file tree
Hide file tree
Showing 9 changed files with 194 additions and 74 deletions.
3 changes: 2 additions & 1 deletion _resouce/css/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
html, body {
html,
body {
height: 100%;
padding: 0;
margin: 0;
Expand Down
95 changes: 46 additions & 49 deletions _resouce/js/script.js
Original file line number Diff line number Diff line change
@@ -1,84 +1,81 @@

// MIERUNE MONO読み込み
const map = new mapboxgl.Map({
container: "map",
container: 'map',
style: {
version: 8,
sources: {
m_mono: {
type: "raster",
tiles: ["https://tile.mierune.co.jp/mierune_mono/{z}/{x}/{y}.png"],
tileSize: 256
}
type: 'raster',
tiles: ['https://tile.mierune.co.jp/mierune_mono/{z}/{x}/{y}.png'],
tileSize: 256,
},
},
layers: [{
id: "m_mono",
type: "raster",
source: "m_mono",
minzoom: 0,
maxzoom: 18
}]
layers: [
{
id: 'm_mono',
type: 'raster',
source: 'm_mono',
minzoom: 0,
maxzoom: 18,
},
],
},
center: [139.770, 35.676],
zoom: 13
center: [139.77, 35.676],
zoom: 13,
});


map.on("load", function () {

map.on('load', function () {
// 元ポイントを取得
const features = turf.featureCollection([
turf.point([139.7594, 35.6865]),
turf.point([139.7692, 35.6665]),
turf.point([139.7812, 35.6849])
turf.point([139.7812, 35.6849]),
]);

// 元ポイント表示
map.addSource("FeaturesPoint", {
type: "geojson",
data: features
map.addSource('FeaturesPoint', {
type: 'geojson',
data: features,
});
map.addLayer({
id: "FeaturesPoint",
type: "circle",
source: "FeaturesPoint",
id: 'FeaturesPoint',
type: 'circle',
source: 'FeaturesPoint',
layout: {},
paint: {
"circle-pitch-alignment": "map",
"circle-stroke-color": "#1253A4",
"circle-stroke-width": 5,
"circle-stroke-opacity": 0.8,
"circle-color": "#1253A4",
"circle-radius": 5,
"circle-opacity": 0.5
}
'circle-pitch-alignment': 'map',
'circle-stroke-color': '#1253A4',
'circle-stroke-width': 5,
'circle-stroke-opacity': 0.8,
'circle-color': '#1253A4',
'circle-radius': 5,
'circle-opacity': 0.5,
},
});


// センターポイントを取得
const center = turf.center(features);

// センターポイント表示
map.addSource("CenterPoint", {
type: "geojson",
data: center
map.addSource('CenterPoint', {
type: 'geojson',
data: center,
});
map.addLayer({
id: "CenterPoint",
type: "circle",
source: "CenterPoint",
id: 'CenterPoint',
type: 'circle',
source: 'CenterPoint',
layout: {},
paint: {
"circle-pitch-alignment": "map",
"circle-stroke-color": "#8DCF3F",
"circle-stroke-width": 10,
"circle-stroke-opacity": 0.8,
"circle-color": "#8DCF3F",
"circle-radius": 10,
"circle-opacity": 0.5
}
'circle-pitch-alignment': 'map',
'circle-stroke-color': '#8DCF3F',
'circle-stroke-width': 10,
'circle-stroke-opacity': 0.8,
'circle-color': '#8DCF3F',
'circle-radius': 10,
'circle-opacity': 0.5,
},
});

});

// コントロール関係表示
Expand Down
4 changes: 2 additions & 2 deletions _resouce/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// CSS一式を読み込んでパッケージ
import "mapbox-gl/dist/mapbox-gl.css";
import "./css/style.css";
import 'mapbox-gl/dist/mapbox-gl.css';
import './css/style.css';

// JS一式を読み込んでパッケージ
import './js/script.js';
3 changes: 2 additions & 1 deletion dist/app.js

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions dist/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

/*!
* @license GNU Affero General Public License.
* Copyright (c) 2015, 2015 Ronny Lorenz <[email protected]>
* v. 1.2.0
* https://github.com/RaumZeit/MarchingSquares.js
*
* MarchingSquaresJS is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MarchingSquaresJS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* As additional permission under GNU Affero General Public License version 3
* section 7, third-party projects (personal or commercial) may distribute,
* include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the
* requirement that said third-party project for that reason alone becomes
* subject to any requirement of the GNU Affero General Public License version 3.
* Any modifications to MarchingSquaresJS, however, must be shared with the public
* and made available.
*
* In summary this:
* - allows you to use MarchingSquaresJS at no cost
* - allows you to use MarchingSquaresJS for both personal and commercial purposes
* - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any
* license as long as this license notice is included
* - enables you to keep the source code of your program that uses MarchingSquaresJS
* undisclosed
* - forces you to share any modifications you have made to MarchingSquaresJS,
* e.g. bug-fixes
*
* You should have received a copy of the GNU Affero General Public License
* along with MarchingSquaresJS. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* splaytree v3.1.0
* Fast Splay tree for Node and browser
*
* @author Alexander Milevski <[email protected]>
* @license MIT
* @preserve
*/

/**
* @license get-closest https://github.com/cosmosio/get-closest
*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 Olivier Scherrer <[email protected]>
*/
20 changes: 10 additions & 10 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Turf.js Starter</title>
</head>
<body>
<div id="map"></div>
<script src="./app.js"></script>
</body>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Turf.js Starter</title>
</head>
<body>
<div id="map"></div>
<script src="./app.js"></script>
</body>
</html>
3 changes: 2 additions & 1 deletion docs/app.js

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions docs/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

/*!
* @license GNU Affero General Public License.
* Copyright (c) 2015, 2015 Ronny Lorenz <[email protected]>
* v. 1.2.0
* https://github.com/RaumZeit/MarchingSquares.js
*
* MarchingSquaresJS is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MarchingSquaresJS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* As additional permission under GNU Affero General Public License version 3
* section 7, third-party projects (personal or commercial) may distribute,
* include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the
* requirement that said third-party project for that reason alone becomes
* subject to any requirement of the GNU Affero General Public License version 3.
* Any modifications to MarchingSquaresJS, however, must be shared with the public
* and made available.
*
* In summary this:
* - allows you to use MarchingSquaresJS at no cost
* - allows you to use MarchingSquaresJS for both personal and commercial purposes
* - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any
* license as long as this license notice is included
* - enables you to keep the source code of your program that uses MarchingSquaresJS
* undisclosed
* - forces you to share any modifications you have made to MarchingSquaresJS,
* e.g. bug-fixes
*
* You should have received a copy of the GNU Affero General Public License
* along with MarchingSquaresJS. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* splaytree v3.1.0
* Fast Splay tree for Node and browser
*
* @author Alexander Milevski <[email protected]>
* @license MIT
* @preserve
*/

/**
* @license get-closest https://github.com/cosmosio/get-closest
*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 Olivier Scherrer <[email protected]>
*/
20 changes: 10 additions & 10 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Turf.js Starter</title>
</head>
<body>
<div id="map"></div>
<script src="./app.js"></script>
</body>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Turf.js Starter</title>
</head>
<body>
<div id="map"></div>
<script src="./app.js"></script>
</body>
</html>

0 comments on commit 2762f5c

Please sign in to comment.