Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kobakazu0429 committed Jun 29, 2018
1 parent 0d59ca3 commit 2c9e786
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 47 deletions.
8 changes: 4 additions & 4 deletions src/assets/css/map-design.css
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ ul {
border-radius: 5px 5px 0 0;
}

input[type="search"] {
input[type='search'] {
width: calc(100vw - 3em);
border: 0;
border-radius: 5px;
Expand All @@ -165,11 +165,11 @@ input[type="search"] {
/* font-size: 1.5em; Safariで入力欄が縦に長くなるのでfont-sizeは使わない */
}

input[type="search"]:focus {
input[type='search']:focus {
outline: 0;
}

input[type="reset"] {
input[type='reset'] {
position: absolute;
top: 0;
right: 0;
Expand All @@ -183,7 +183,7 @@ input[type="reset"] {
/* ボタンクリック時に文字が右下へ下がるのを防ぐため */
}

input[type="reset"]:hover {
input[type='reset']:hover {
background-color: #ccc;
}

Expand Down
72 changes: 37 additions & 35 deletions src/assets/layers/overlay.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
// パスの指定
var path = 'https://kure-kosen.github.io/kure_kosen_map/';
// var path = 'https://kure-kosen.github.io/kure_kosen_map/';
// var path = 'C:/Users/kazu/Documents/GitHub/kure_kosen_map/';
var path = '/Users/kazu/workspace/kure_kosen_map/src/';

// 現在地の円
var geocycle = new ol.layer.Vector({
source: new ol.source.Vector({
features: [accuracyFeature, positionFeature]
})
});
source: new ol.source.Vector({
features: [accuracyFeature, positionFeature]
})
});

//呉市オープンデータのaed
//作成日:20171218
var aed = new ol.layer.Vector({
title: 'AED',
source: new ol.source.Vector({
format: new ol.format.GeoJSON(),
url: path + 'assets/geojson/20171224.geojson',
crossOrigin: 'anonymous'
}),
style: new ol.style.Style({
image: new ol.style.Icon({
src:path + 'assets/icon/aed.png', scale: 0.2
})
})
});
title: 'AED',
source: new ol.source.Vector({
format: new ol.format.GeoJSON(),
url: path + 'assets/geojson/20171224.geojson',
crossOrigin: 'anonymous'
}),
style: new ol.style.Style({
image: new ol.style.Icon({
src: path + 'assets/icon/aed.png',
scale: 0.2
})
})
});

//kmlのサンプル
var kml = new ol.layer.Vector({
title: 'kml',
source: new ol.source.Vector({
format: new ol.format.KML(),
url: path + 'assets/kml/kokudo.kml',
crossOrigin: 'anonymous'
})
});
title: 'kml',
source: new ol.source.Vector({
format: new ol.format.KML(),
url: path + 'assets/kml/kokudo.kml',
crossOrigin: 'anonymous'
})
});

//xyzタイルのサンプル
var tile = new ol.layer.Tile({
title: 'tile',
source: new ol.source.XYZ({
url: path + 'assets/tiles2/{z}/{x}/{y}.png',
crossOrigin: 'anonymous'
})
});
title: 'tile',
source: new ol.source.XYZ({
url: path + 'assets/tiles2/{z}/{x}/{y}.png',
crossOrigin: 'anonymous'
})
});

// var vectorSource = new ol.layer.Vector({
// title: 'test1',
Expand All @@ -53,8 +55,8 @@ var tile = new ol.layer.Tile({
// })
// });

var vectorSource = new ol.source.Vector({
url: 'assets/geojson/searchtest.geojson',
projection: 'EPSG:3857',
format: new ol.format.GeoJSON()
});
var vectorSource = new ol.source.Vector({
url: 'assets/geojson/searchtest.geojson',
projection: 'EPSG:3857',
format: new ol.format.GeoJSON()
});
9 changes: 1 addition & 8 deletions src/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
<div id="fullscreen" class="fullscreen">
<div id="map" class="map"></div>
<div class="fullscreenlayer">
<div class="block">
<form action="#" method="post" class="search" id="search">
<div class="search-box">
<input type="text" name="q">
<input type="reset" value="&#61453;" class="fa">
</div>
</form>
</div>

<!-- 開くボタン -->
<div class="wrap-menubtn wrap-openmenu ol-unselectable ol-control" id="wrap-openmenu">
Expand Down Expand Up @@ -167,5 +159,6 @@ <h2>Options:</h2>

<script type="text/javascript" src="assets/js/main.js"></script>
<script type="text/javascript" src="assets/js/map-design.js"></script>
<link rel="stylesheet" href="assets/css/map-design.css">
</body>
</html>

0 comments on commit 2c9e786

Please sign in to comment.