map: add Prouty 2018 saturday routes
This commit is contained in:
parent
adfc16c917
commit
b3d36aa030
1238
src/gpx/Prouty_20-Mile_Bike_Ride_(2018_FINAL).gpx
Normal file
1238
src/gpx/Prouty_20-Mile_Bike_Ride_(2018_FINAL).gpx
Normal file
File diff suppressed because it is too large
Load Diff
3164
src/gpx/Prouty_35-Mile_Bike_Route_(2018)__.gpx
Normal file
3164
src/gpx/Prouty_35-Mile_Bike_Route_(2018)__.gpx
Normal file
File diff suppressed because it is too large
Load Diff
4673
src/gpx/Prouty_50-Mile_Bike_Ride_(2018).gpx
Normal file
4673
src/gpx/Prouty_50-Mile_Bike_Ride_(2018).gpx
Normal file
File diff suppressed because it is too large
Load Diff
8342
src/gpx/Prouty_77-Mile_Bike_Route_(2018)_.gpx
Normal file
8342
src/gpx/Prouty_77-Mile_Bike_Route_(2018)_.gpx
Normal file
File diff suppressed because it is too large
Load Diff
10247
src/gpx/Prouty_Century_(Clark_Pond_Rte._-_2018).gpx
Normal file
10247
src/gpx/Prouty_Century_(Clark_Pond_Rte._-_2018).gpx
Normal file
File diff suppressed because it is too large
Load Diff
10844
src/gpx/Prouty_Century_(French_Pond_Rte._-_2018).gpx
Normal file
10844
src/gpx/Prouty_Century_(French_Pond_Rte._-_2018).gpx
Normal file
File diff suppressed because it is too large
Load Diff
7667
src/gpx/Prouty_Metric-Century_Gravel_Ride_(2018).gpx
Normal file
7667
src/gpx/Prouty_Metric-Century_Gravel_Ride_(2018).gpx
Normal file
File diff suppressed because it is too large
Load Diff
22
src/map.js
22
src/map.js
@ -3,6 +3,7 @@ import {Map as olMap, View} from 'ol';
|
|||||||
import {Control} from 'ol/control';
|
import {Control} from 'ol/control';
|
||||||
import {Group as LayerGroup, Tile as TileLayer, Vector as VectorLayer} from 'ol/layer';
|
import {Group as LayerGroup, Tile as TileLayer, Vector as VectorLayer} from 'ol/layer';
|
||||||
import {OSM, Vector as VectorSource} from 'ol/source';
|
import {OSM, Vector as VectorSource} from 'ol/source';
|
||||||
|
import {GPX} from 'ol/format';
|
||||||
import Feature from 'ol/Feature';
|
import Feature from 'ol/Feature';
|
||||||
import {fromLonLat} from 'ol/proj';
|
import {fromLonLat} from 'ol/proj';
|
||||||
import {Circle as CircleStyle, Icon, Fill, Stroke, Style, Text} from 'ol/style';
|
import {Circle as CircleStyle, Icon, Fill, Stroke, Style, Text} from 'ol/style';
|
||||||
@ -16,10 +17,29 @@ import {APRSParser} from 'aprs-parser';
|
|||||||
|
|
||||||
let tile_layer = new TileLayer({source: new OSM()});
|
let tile_layer = new TileLayer({source: new OSM()});
|
||||||
|
|
||||||
|
import route_data from 'gpx/*.gpx';
|
||||||
|
|
||||||
|
let routes = new LayerGroup({
|
||||||
|
title: "Routes",
|
||||||
|
layers: Object.keys(route_data).map(name => new VectorLayer({
|
||||||
|
title: name.replace(/_/g, " "),
|
||||||
|
source: new VectorSource({
|
||||||
|
url: route_data[name],
|
||||||
|
format: new GPX()
|
||||||
|
}),
|
||||||
|
style: new Style({
|
||||||
|
stroke: new Stroke(
|
||||||
|
{color: 'hsl(200, 90%, 30%)', width: 5}
|
||||||
|
)})
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
let map = new olMap({
|
let map = new olMap({
|
||||||
target: 'map',
|
target: 'map',
|
||||||
layers: [
|
layers: [
|
||||||
tile_layer
|
tile_layer,
|
||||||
|
routes
|
||||||
],
|
],
|
||||||
view: new View({
|
view: new View({
|
||||||
center: fromLonLat([-72.15, 43.90]),
|
center: fromLonLat([-72.15, 43.90]),
|
||||||
|
Loading…
Reference in New Issue
Block a user