Skip to content

Commit

Permalink
Merge pull request #170 from HSLdevcom/development
Browse files Browse the repository at this point in the history
Add pikaratikka to the style
  • Loading branch information
jhanninen authored Sep 8, 2023
2 parents 6f7e9b9 + b5840ed commit 988864d
Show file tree
Hide file tree
Showing 11 changed files with 259 additions and 4 deletions.
9 changes: 9 additions & 0 deletions cli/static/driver-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@
"circle-radius": 8
}
},
{
"id": "stops_lrail",
"source": "stops-by-routes",
"minzoom": 0,
"filter": ["==", ["get", "timingStopType"], 0],
"paint": {
"circle-radius": 8
}
},
{
"id": "stops_subway",
"source": "stops-by-routes",
Expand Down
12 changes: 12 additions & 0 deletions cli/static/routes-with-departures-only.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@
"id": "route_tram_inner",
"filter": ["!=", ["boolean", ["get", "hasRegularDayDepartures"]], false]
},
{
"id": "route_lrail_case",
"filter": ["!=", ["boolean", ["get", "hasRegularDayDepartures"]], false]
},
{
"id": "route_lrail",
"filter": ["!=", ["boolean", ["get", "hasRegularDayDepartures"]], false]
},
{
"id": "route_lrail_inner",
"filter": ["!=", ["boolean", ["get", "hasRegularDayDepartures"]], false]
},
{
"id": "route_trunk_case",
"filter": ["!=", ["boolean", ["get", "hasRegularDayDepartures"]], false]
Expand Down
4 changes: 4 additions & 0 deletions cli/static/stops-with-route-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"id": "stops_tram",
"source": "stops-by-routes"
},
{
"id": "stops_lrail",
"source": "stops-by-routes"
},
{
"id": "stops_subway",
"source": "stops-by-routes"
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<meta charset="utf-8" />
<title>HSL Map Style</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://api.mapbox.com/mapbox-gl-js/v0.45.0/mapbox-gl.js"></script>
<link href="https://api.mapbox.com/mapbox-gl-js/v0.45.0/mapbox-gl.css" rel="stylesheet" />
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script>
<link href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css" rel="stylesheet" />
<style>
body {
margin: 0;
Expand All @@ -31,7 +31,7 @@
<div id="map"></div>
<div id="info"></div>
<script>
var map = new mapboxgl.Map({
var map = new maplibregl.Map({
container: "map", // container id
style: "style.json", //stylesheet location
center: [24.9, 60.5], // starting position
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hsl-map-style",
"version": "1.0.1",
"version": "1.1.0",
"description": "",
"main": "index.js",
"bin": {
Expand Down
77 changes: 77 additions & 0 deletions style.json
Original file line number Diff line number Diff line change
Expand Up @@ -2312,6 +2312,63 @@
}
}
},
{
"id": "route_lrail_case",
"type": "line",
"source": "routes",
"source-layer": "routes",
"filter": ["==", ["get", "mode"], "L_RAIL"],
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "#fff",
"line-width": {
"stops": [
[10, 4],
[22, 8]
]
}
}
},
{
"id": "route_lrail",
"type": "line",
"source": "routes",
"source-layer": "routes",
"filter": ["==", ["get", "mode"], "L_RAIL"],
"layout": {
"line-cap": "round",
"line-join": "round",
"line-round-limit": 1
},
"paint": {
"line-color": "#00b3aa",
"line-width": {
"stops": [
[10, 2],
[22, 6]
]
}
}
},
{
"id": "route_lrail_inner",
"type": "line",
"source": "routes",
"source-layer": "routes",
"filter": ["==", ["get", "mode"], "L_RAIL"],
"paint": {
"line-color": "#30bfb6",
"line-width": {
"stops": [
[10, 0.5],
[22, 2]
]
}
}
},
{
"id": "route_ferry",
"type": "line",
Expand Down Expand Up @@ -3466,6 +3523,26 @@
]
}
},
{
"id": "stops_lrail",
"type": "circle",
"source": "stops",
"source-layer": "stops",
"minzoom": 13,
"filter": ["==", ["get", "mode"], "L_RAIL"],
"paint": {
"circle-color": "#00b2a9",
"circle-radius": [
"interpolate",
["exponential", 1.15],
["zoom"],
12,
1,
22,
24
]
}
},
{
"id": "stops_subway",
"type": "circle",
Expand Down
96 changes: 96 additions & 0 deletions style/hsl-map-style-routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,102 @@
}
}
},
{
"id": "route_lrail_case",
"type": "line",
"source": "routes",
"source-layer": "routes",
"filter": [
"==",
[
"get",
"mode"
],
"L_RAIL"
],
"layout": {
"line-cap": "round",
"line-join": "round"
},
"paint": {
"line-color": "#fff",
"line-width": {
"stops": [
[
10,
4
],
[
22,
8
]
]
}
}
},
{
"id": "route_lrail",
"type": "line",
"source": "routes",
"source-layer": "routes",
"filter": [
"==",
[
"get",
"mode"
],
"L_RAIL"
],
"layout": {
"line-cap": "round",
"line-join": "round",
"line-round-limit": 1
},
"paint": {
"line-color": "#00b3aa",
"line-width": {
"stops": [
[
10,
2
],
[
22,
6
]
]
}
}
},
{
"id": "route_lrail_inner",
"type": "line",
"source": "routes",
"source-layer": "routes",
"filter": [
"==",
[
"get",
"mode"
],
"L_RAIL"
],
"paint": {
"line-color": "#30bfb6",
"line-width": {
"stops": [
[
10,
0.5
],
[
22,
2
]
]
}
}
},
{
"id": "route_ferry",
"type": "line",
Expand Down
32 changes: 32 additions & 0 deletions style/hsl-map-style-stops.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,38 @@
]
}
},
{
"id": "stops_lrail",
"type": "circle",
"source": "stops",
"source-layer": "stops",
"minzoom": 13,
"filter": [
"==",
[
"get",
"mode"
],
"L_RAIL"
],
"paint": {
"circle-color": "#00b2a9",
"circle-radius": [
"interpolate",
[
"exponential",
1.15
],
[
"zoom"
],
12,
1,
22,
24
]
}
},
{
"id": "stops_subway",
"type": "circle",
Expand Down
9 changes: 9 additions & 0 deletions style/hsl-map-theme-driver-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@
"circle-radius": 8
}
},
{
"id": "stops_lrail",
"source": "stops-by-routes",
"minzoom": 0,
"filter": ["==", ["get", "timingStopType"], 0],
"paint": {
"circle-radius": 8
}
},
{
"id": "stops_subway",
"source": "stops-by-routes",
Expand Down
12 changes: 12 additions & 0 deletions style/hsl-map-theme-routes-with-departures-only.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@
"id": "route_tram_inner",
"filter": ["!=", ["boolean", ["get", "hasRegularDayDepartures"]], false]
},
{
"id": "route_lrail_case",
"filter": ["!=", ["boolean", ["get", "hasRegularDayDepartures"]], false]
},
{
"id": "route_lrail",
"filter": ["!=", ["boolean", ["get", "hasRegularDayDepartures"]], false]
},
{
"id": "route_lrail_inner",
"filter": ["!=", ["boolean", ["get", "hasRegularDayDepartures"]], false]
},
{
"id": "route_trunk_case",
"filter": ["!=", ["boolean", ["get", "hasRegularDayDepartures"]], false]
Expand Down
4 changes: 4 additions & 0 deletions style/hsl-map-theme-stops-with-route-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"id": "stops_tram",
"source": "stops-by-routes"
},
{
"id": "stops_lrail",
"source": "stops-by-routes"
},
{
"id": "stops_subway",
"source": "stops-by-routes"
Expand Down

0 comments on commit 988864d

Please sign in to comment.