diff --git a/Auto_editsys/user/data/data2.db b/Auto_editsys/user/data/data2.db index 33f49a5..644d10a 100644 --- a/Auto_editsys/user/data/data2.db +++ b/Auto_editsys/user/data/data2.db Binary files differ diff --git a/Auto_editsys/user/data/history.db b/Auto_editsys/user/data/history.db index e69de29..5f564ee 100644 --- a/Auto_editsys/user/data/history.db +++ b/Auto_editsys/user/data/history.db Binary files differ diff --git a/Auto_editsys/user/data/history.rb b/Auto_editsys/user/data/history.rb index b37b856..a6d2fe9 100755 --- a/Auto_editsys/user/data/history.rb +++ b/Auto_editsys/user/data/history.rb @@ -75,7 +75,7 @@

\n" - print"
\n" + print"\n" print"

画像選択

\n" print"
\n" diff --git a/Auto_editsys/user/data/kadokko.jpg b/Auto_editsys/user/data/kadokko.jpg new file mode 100644 index 0000000..57272d5 --- /dev/null +++ b/Auto_editsys/user/data/kadokko.jpg Binary files differ diff --git a/Auto_editsys/user/data/storymap.html b/Auto_editsys/user/data/storymap.html index 5272e8a..1df7c75 100644 --- a/Auto_editsys/user/data/storymap.html +++ b/Auto_editsys/user/data/storymap.html @@ -49,7 +49,7 @@

どのマップにデータを加えますか?


ヒストリーマップ -伝統芸能マップ +伝統芸能マップ 安全マップ 食べ物マップ 除雪マップ @@ -59,6 +59,18 @@

新しいマップを生成する

New map name :
+


+ +

マップを閲覧


+ヒストリーマップ +伝統芸能マップ +安全マップ +食べ物マップ +除雪マップ +遊佐湧水マップ +


+

+ diff --git a/Auto_editsys/user/data/yuza.html b/Auto_editsys/user/data/yuza.html new file mode 100644 index 0000000..18d8a84 --- /dev/null +++ b/Auto_editsys/user/data/yuza.html @@ -0,0 +1,37 @@ + + + +CMDSmap + + + + + + + + + + + + + + +

遊佐湧水マップ

+

遊佐町内には、はっこちゃの水から始まり、八面川湧水まで 14 もの湧水があります。「遊佐湧水マップ」を片手に湧水めぐりをしてみてはいかがでしょうか。のような一文を付けておくとよい

+
+
+ + +

+
+
+ + + + diff --git a/Auto_editsys/user/data/yuza_wakimizu.geojson b/Auto_editsys/user/data/yuza_wakimizu.geojson new file mode 100644 index 0000000..2c2252f --- /dev/null +++ b/Auto_editsys/user/data/yuza_wakimizu.geojson @@ -0,0 +1,134 @@ +{ + "type":"FeatureCollection", + "features":[ + { + "type":"Feature", + "properties":{ + "name":"かどっこの水", + "description":"JR遊佐駅から徒歩で約15分のところにある「かどっこの水」。遊佐四大祭の一つである「諏訪部祭」が行われる「本願寺」の裏手にある。\n{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/kadokko.jpg}}" + }, + "geometry":{ + "type":"Point", + "coordinates":[139.914617,39.014557] + } + }, + { + "type":"Feature", + "properties":{ + "name":"にぎわいの水", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/nigiwai.jpg}}" + + }, + "geometry":{ + "type":"Point", + "coordinates":[139.911695,39.016165] + } + }, + { + "type":"Feature", + "properties":{ + "name":"はっこちゃの水", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/hakkotya.jpg}}" + }, + "geometry":{ + "type":"Point", + "coordinates":[139.907297,39.017183]}}, +{ + "type":"Feature", + "properties":{ + "name":"ゆざっこの水", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/yuzakko.jpg}}" + }, + "geometry":{ + "type":"Point", + "coordinates":[139.909706,39.01874]}}, +{ + "type":"Feature", + "properties":{ + "name":"丸勝の水", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/marukatsu.jpg}}" + }, + "geometry":{ + "type":"Point", + "coordinates":[139.916306,39.015566]}}, +{ + "type":"Feature", + "properties":{ + "name":"丸幸の水", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/marukojpg}}" + }, + "geometry":{ + "type":"Point", + "coordinates":[139.90914,39.019184]}}, +{ + "type":"Feature", + "properties":{ + "name":"京屋の水", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/kyoya.jpg}}" + }, + "geometry":{ + "type":"Point","coordinates":[139.913352,39.014242]}}, +{ + "type":"Feature", + "properties":{ + "name":"八面川湧水", + "description":"八面川の読み方は「やづめがわ」。この湧水は町内を流れる「八ッ面川」の一番近くに位置している。川には沢山の綺麗な冷たい井戸水を流水することで、清流を好む魚「イバラトミヨ」が生息している。{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/yazume.jpg}}" + }, + "geometry":{ + "type":"Point","coordinates":[139.907837,39.015851]}}, +{ + "type":"Feature", + "properties":{ + "name":"六日町の水", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/muikamati.jpg}}" + }, + "geometry":{ + "type":"Point", + "coordinates":[139.911227,39.017761]}}, +{ + "type":"Feature", + "properties":{ + "name":"光月堂の水", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/kogetsudo.jpg}}" + }, + "geometry":{ + "type":"Point", + "coordinates":[139.907917,39.019275]}}, +{ + "type":"Feature", + "properties":{ + "name":"七日町の水", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/nanokamati.jpg}}" + }, + "geometry":{ + "type":"Point", + "coordinates":[139.908056,39.020088]}}, +{ + "type":"Feature", + "properties":{ + "name":"なごみの水", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/nagomi.jpg}}" + }, + "geometry":{ + "type":"Point", + "coordinates":[139.908263,39.019289]}}, +{ + "type":"Feature", + "properties":{ + "name":"深山神社の水", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/sinzanjinja.jpg}}" + }, + "geometry":{ + "type":"Point", + "coordinates":[139.909754,39.019707]}}, +{ + "type":"Feature", + "properties":{ + "name":"貴福神社", + "description":"{{https://www.yatex.org/gitbucket/Kan/yuza/raw/master/kihukijinja.jpg}}" + }, + "geometry":{ + "type":"Point", + "coordinates":[139.913697,39.014578]}} + ] +} diff --git a/Auto_editsys/user/data/yuza_wakimizu.js b/Auto_editsys/user/data/yuza_wakimizu.js new file mode 100644 index 0000000..2a03269 --- /dev/null +++ b/Auto_editsys/user/data/yuza_wakimizu.js @@ -0,0 +1,106 @@ + +function okiro(){ + // data = $.csv.toObjects(Text); + var timerInterval = 10000; // GPS失敗で何秒後に再取得か + var tmId = null; + var nn = 0, countD = document.getElementById("countdown"); + + var jsonmap = L.map("mymap"); + var layer = L.tileLayer( + 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png', + {attribution: + '© 国土地理院' + }).addTo(jsonmap); + + var point = L.marker().addTo(jsonmap); + var stop = document.getElementById("stp"); + var gps = document.getElementById("str"); + var ser = document.getElementById("serif"); + var tm = document.getElementById("time"); + var nowTrying = null; + + function tryGetGPS() { + clearTimer(); + countD.textContent = "START!" + ser.textContent = "get GPS..." + nowTrying = navigator.geolocation.getCurrentPosition( + onSuccess, onError,{ + maximumAge: 0, timeout: 3000, enableHighAccuracy: true}) + } + + function onemore() { + if (nowTrying || tmId) { + info.textContent = "It already getting a GPS ...or 待機中です。"; + } else { + startTimer(); + } + } + function startTimer() { + if (tmId==null){ + tmId = setTimeout(tryGetGPS, 5000); + ser.textContent = "5秒後にGPS取得…"; + tm.textConent = "ok"; + } + } + function clearTimer() { + if (tmId) { + clearTimeout(tmId); + tmId = null; + } + } + + function countDown() { + tryGetGPS(); + } + + function stopCountDown() { + clearTimeout(); + countD.textContent = "stop"; + ser.innerHTML = "startボタンをもう一度押すと始まります"; + } + + function onSuccess(pos) { + nowTrying = null; + // var pulsingIcon = L.icon.pulse({iconSize:[20,20],color:'#1199fb'}); + var latlng = L.latLng([pos.coords.latitude, pos.coords.longitude]); + ser.textContent = "現在の位置は"+latlng+"です。"; + jsonmap.panTo(latlng); + // L.marker([lat, lng],{icon: pulsingIcon}).addTo(geomap); + point.setPopupContent("now").openPopup().setLatLng(latlng); + var lat = latlng.lat, lng = latlng.lng; + } + function onError(err) { // 失敗時 + nowTrying = null; + ser.textContent = "現在位置の取得失敗.10秒後にもう一回"; + tmId = setTimeout(tryGetGPS, timerInterval); + } + + + + var yuzalayer = new L.GeoJSON.AJAX("yuza_wakimizu.geojson",{ + onEachFeature: function(j, layer) { + let p = j.properties; + if (p) { + let name = p.name, desc = p.description; + if (p.name) { + if (desc) { + // {{画像URL}} → に置換する + desc = desc.replace(/{{(.*)}}/, '') + } + let popup = "

" + name + "

" + "

" + desc + "

"; + layer.bindPopup(popup); + } + } + }}); + yuzalayer.addTo(jsonmap); + yuzalayer.on('data:loaded', function() { + jsonmap.fitBounds(yuzalayer.getBounds()); + // alert(JSON.stringify(yuzalayer.toGeoJSON())); + // yuzalayer.toGeoJSON() で元のGeoJSONが得られる + }); + L.control.layers(null, {"遊佐湧水マーカー": yuzalayer}).addTo(jsonmap); + + gps.addEventListener("click",countDown , false); + stop.addEventListener("click", stopCountDown, false); +}; +document.addEventListener("DOMContentLoaded", okiro, false); diff --git a/Auto_editsys/user/pstore/data.db b/Auto_editsys/user/pstore/data.db index 6068ad6..ade90e9 100644 --- a/Auto_editsys/user/pstore/data.db +++ b/Auto_editsys/user/pstore/data.db Binary files differ diff --git a/Auto_editsys/user/yuza_wakimizu.js b/Auto_editsys/user/yuza_wakimizu.js new file mode 100644 index 0000000..2c2002d --- /dev/null +++ b/Auto_editsys/user/yuza_wakimizu.js @@ -0,0 +1,177 @@ + +// ajaxを使い、csvを読み込む +// $(document).ready(function() { +// $.ajax({ +// type: "GET", +// url: "./pstore/data.csv", +// dataType: "text", +// success: function(data){okiro(data)} +// }); +// }); + +function okiro(){ + // data = $.csv.toObjects(Text); + var timerInterval = 10000; // GPS失敗で何秒後に再取得か + var tmId = null; + var nn = 0, countD = document.getElementById("countdown"); + + // make a map////////////////////////////////////////////// + var osm = + L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { + attribution: + '© OpenStreetMap contributors', + maxZoom: 20, maxNativeZoom: 18 + }); + // var kokudo = + // L.tileLayer('//cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png', { + // attribution: + // 'kokudo' + // }); + var geomap = L.map("mymap").setView([38.893, 139.8193], 16); + osm.addTo(geomap); + var baseLayers = {'OpenStreetMap': osm }; + L.control.layers(baseLayers).addTo(geomap); + //////////////////////////////////////////////////////////////// + + var point = L.marker(geomap.getCenter()).addTo(geomap); + var stop = document.getElementById("stp"); + var gps = document.getElementById("str"); + var ser = document.getElementById("serif"); + var tm = document.getElementById("time"); + var nowTrying = null; + + /* + var m1 = L.marker([39,140]).addTo(geomap) + */ + + function tryGetGPS() { + clearTimer(); + countD.textContent = "START!" + ser.textContent = "get GPS..." + nowTrying = navigator.geolocation.getCurrentPosition( + onSuccess, onError,{ + maximumAge: 0, timeout: 3000, enableHighAccuracy: true}) + } + + function onemore() { + if (nowTrying || tmId) { + info.textContent = "It already getting a GPS ...or 待機中です。"; + } else { + startTimer(); + } + } + function startTimer() { + if (tmId==null){ + tmId = setTimeout(tryGetGPS, 5000); + ser.textContent = "5秒後にGPS取得…"; + tm.textConent = "ok"; + } + } + function clearTimer() { + if (tmId) { + clearTimeout(tmId); + tmId = null; + } + } + + function countDown() { + tryGetGPS(); + } + + function stopCountDown() { + clearTimeout(); + countD.textContent = "stop"; + ser.innerHTML = "startボタンをもう一度押すと始まります"; + } + + function onSuccess(pos) { + nowTrying = null; + // var pulsingIcon = L.icon.pulse({iconSize:[20,20],color:'#1199fb'}); + var latlng = L.latLng([pos.coords.latitude, pos.coords.longitude]); + ser.textContent = "現在の位置は"+latlng+"です。"; + geomap.panTo(latlng); + // L.marker([lat, lng],{icon: pulsingIcon}).addTo(geomap); + point.setPopupContent("now").openPopup().setLatLng(latlng); + var lat = latlng.lat, lng = latlng.lng; + } + function onError(err) { // 失敗時 + nowTrying = null; + ser.textContent = "現在位置の取得失敗.10秒後にもう一回"; + tmId = setTimeout(tryGetGPS, timerInterval); + } + + + function onMapClick(e){ + var marker = L.marker(e.latlng,{ + draggable: true, + title: "Resouse location", + alt: "Resouce location", + riseOnHover: true + }).addTo(geomap).bindPopup(e.latlng.toString()).openPopup(); + + marker.on("dragged", function (ev){ + var cangedPos = ev.target.getLatlng(); + this.bindPopup(changedPos.toString()).openPopup(); + + }) + } + + geomap.on('click', onMapClick); + + + geomap.on("click", function(geotag) { + var form = document.forms.geotag; + var idokeido = document.getElementById("gps"); + geotagcopy = "exiftool -gpslatitude="+geotag.latlng.lat+" -gpslatitudeRef=N -gpslongitude="+geotag.latlng.lng+" -gpslongitudeRef=E"; + + form.lati.value = geotagcopy; + }); + /* + idokeido.textContent = geotagcopy; + */ + + geomap.on("click",function(geopop) { + var popup = L.popup(); + popup.setLatLng(geopop.latlng) + .setContent("" + geopop.latlng.toString()).openOn(geomap); + }); + + + // data_array= [0,0,0]; //create it before filling + // for (i = 0; i < data.length; i++) { + // //地図上に表示するデータの設定 + // data_array[i] = [parseFloat(data[i].latitude), parseFloat(data[i].longitude), parseFloat(data[i].mag)]; // if values are marked as string in the object else: + // // data_array[i] = [data[i].lat,data[i].lon,data[i].val]; + // var heat = L.marker([(data[i].latitude), (data[i].longitude)],{ + // //ポップアップの内容 + // }).bindPopup((data[i].mag)).addTo(geomap); + // }; + + var testlayer = new L.GeoJSON.AJAX("../test.geojson",{ + onEachFeature: function(j, layer) { + let p = j.properties; + if (p) { + let name = p.name, desc = p.description; + if (p.name) { + if (desc) { + // {{画像URL}} → に置換する + desc = desc.replace(/{{(.*)}}/, '') + } + let popup = "

" + name + "

" + "

" + desc + "

"; + layer.bindPopup(popup); + } + } + }}); + testlayer.addTo(geomap); + testlayer.on('data:loaded', function() { + jsonmap.fitBounds(testlayer.getBounds()); + // alert(JSON.stringify(testlayer.toGeoJSON())); + // testlayer.toGeoJSON() で元のGeoJSONが得られる + }); + + + + gps.addEventListener("click",countDown , false); + stop.addEventListener("click", stopCountDown, false); +}; +document.addEventListener("DOMContentLoaded", okiro, false);