| |
---|
| | ]; |
---|
| | } |
---|
| | }); |
---|
| | |
---|
| | const fuel1 = new ol.layer.VectorTile({ |
---|
| | source: new ol.source.VectorTile({ |
---|
| | format: new ol.format.MVT(), |
---|
| | url: "./tiles/tileFuel1/" + "{z}/{x}/{y}.pbf" |
---|
| | }), |
---|
| | title: "Fuel: 未入力", |
---|
| | visible: true, |
---|
| | opacity: 1, |
---|
| | style: function(feature){ |
---|
| | return [ |
---|
| | new ol.style.Style({ |
---|
| | image: new ol.style.Circle({ |
---|
| | radius: 6, |
---|
| | fill: new ol.style.Fill({color: "#ffc800"}) |
---|
| | }) |
---|
| | }) |
---|
| | ]; |
---|
| | } |
---|
| | }); |
---|
| | |
---|
| | const fuel2 = new ol.layer.VectorTile({ |
---|
| | source: new ol.source.VectorTile({ |
---|
| | format: new ol.format.MVT(), |
---|
| | url: "./tiles/tileFuel2/" + "{z}/{x}/{y}.pbf" |
---|
| | }), |
---|
| | title: "Fuel: 未入力", |
---|
| | visible: true, |
---|
| | opacity: 1, |
---|
| | style: function(feature){ |
---|
| | return [ |
---|
| | new ol.style.Style({ |
---|
| | image: new ol.style.Circle({ |
---|
| | radius: 6, |
---|
| | fill: new ol.style.Fill({color: "#00ff00"}) |
---|
| | }) |
---|
| | }) |
---|
| | ]; |
---|
| | } |
---|
| | }); |
---|
| | |
---|
| | |
---|
| | const view = new ol.View({ |
---|
| | center: ol.proj.fromLonLat([140.241,36.131]), |
---|
| | zoom: 9 |
---|
| | zoom: 11 |
---|
| | }); |
---|
| | |
---|
| | const map = new ol.Map({ |
---|
| | target: "map", |
---|
| | controls: ol.control.defaults().extend([new ol.control.ScaleLine()]), |
---|
| | view: view, |
---|
| | layers: [ort, fuel0] |
---|
| | layers: [ort, fuel0, fuel1, fuel2] |
---|
| | }); |
---|
| | |
---|
| | map.on("click", function(evt){ |
---|
| | const feature = map.forEachFeatureAtPixel(evt.pixel, function(feature){ |
---|
| |
---|
| | |