From 2c9e78617b342f00413dd46cb10492c612f4e804 Mon Sep 17 00:00:00 2001 From: kobakakzu0429 Date: Fri, 29 Jun 2018 21:58:29 +0900 Subject: [PATCH] fix --- src/assets/css/map-design.css | 8 ++-- src/assets/layers/overlay.js | 72 ++++++++++++++++++----------------- src/map.html | 9 +---- 3 files changed, 42 insertions(+), 47 deletions(-) diff --git a/src/assets/css/map-design.css b/src/assets/css/map-design.css index 93a8e60..041cbb3 100644 --- a/src/assets/css/map-design.css +++ b/src/assets/css/map-design.css @@ -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; @@ -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; @@ -183,7 +183,7 @@ input[type="reset"] { /* ボタンクリック時に文字が右下へ下がるのを防ぐため */ } -input[type="reset"]:hover { +input[type='reset']:hover { background-color: #ccc; } diff --git a/src/assets/layers/overlay.js b/src/assets/layers/overlay.js index b780d9c..a0235dd 100644 --- a/src/assets/layers/overlay.js +++ b/src/assets/layers/overlay.js @@ -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', @@ -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() +}); diff --git a/src/map.html b/src/map.html index b801ec8..85650f4 100644 --- a/src/map.html +++ b/src/map.html @@ -14,14 +14,6 @@
-
- -
@@ -167,5 +159,6 @@

Options:

+