map: add Prouty 2018 saturday routes

This commit is contained in:
Adam Goldsmith 2018-08-10 11:42:08 -04:00
parent adfc16c917
commit b3d36aa030
8 changed files with 46196 additions and 1 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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]),