-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
17 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ export function makeCircleLayers(map:Map, darkMode: boolean, layerspercategory: | |
'circle-stroke-opacity': ['interpolate', ['linear'], ['zoom'], 7.9, 0, 9, 0.9], | ||
'circle-stroke-width': 0.8, | ||
'circle-emissive-strength': 1, | ||
'circle-opacity': 0.3 | ||
'circle-opacity': 0.7 | ||
}, | ||
minzoom: 7 | ||
}); | ||
|
@@ -78,7 +78,7 @@ export function makeCircleLayers(map:Map, darkMode: boolean, layerspercategory: | |
'circle-stroke-color': '#fff', | ||
'circle-emissive-strength': 1, | ||
'circle-stroke-width': 1, | ||
'circle-opacity': 0.3 | ||
'circle-opacity': 1 | ||
} | ||
}); | ||
|
||
|
@@ -132,7 +132,7 @@ export function makeCircleLayers(map:Map, darkMode: boolean, layerspercategory: | |
'circle-stroke-color': '#fff', | ||
'circle-stroke-width': 1, | ||
'circle-emissive-strength': 1, | ||
'circle-opacity': 0.6 | ||
'circle-opacity': 1 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
kylerchin
Member
|
||
} | ||
}); | ||
|
||
|
@@ -179,7 +179,7 @@ export function makeCircleLayers(map:Map, darkMode: boolean, layerspercategory: | |
'circle-stroke-color': '#fff', | ||
'circle-stroke-width': 1, | ||
'circle-emissive-strength': 1, | ||
'circle-opacity': 0.8 | ||
'circle-opacity': 1 | ||
} | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
export function makeBearingArrowPointers(map:any, darkMode:boolean,layerspercategory:any) { | ||
const busbearingiconsize = ['interpolate', ['linear'], ['zoom'], 9, 0.2, 12, 0.5, 15, 1]; | ||
const busbearingiconsize = 0.3; | ||
This comment has been minimized.
Sorry, something went wrong.
kylerchin
Member
|
||
|
||
const busbearingoffset = ['interpolate', ['linear'], ['zoom'],10, ['literal', [0, -64]], 13, ['literal', [0, -45]], 15, ['literal', [0, -48]]]; | ||
const busbearingoffset = ['literal', [0, -43]]; | ||
|
||
const railbearingiconsize = ['interpolate', ['linear'], ['zoom'], 9, 0.2, 12, 0.3, 15, 0.5]; | ||
const railbearingiconsize = 0.5; | ||
|
||
const railbearingoffset = ['interpolate', ['linear'], ['zoom'],9, ['literal', [0, -80]], 13, ['literal', [0, -60]], 15, ['literal', [0, -60]]]; | ||
const railbearingoffset = ['literal', [0, -40]]; | ||
|
||
const geobearingoffset = ['interpolate', ['linear'], ['zoom'],9, ['literal', [0, -80]], 13, ['literal', [0, -60]], 15, ['literal', [0, -60]], 17, ['literal', [0, -50]]]; | ||
|
||
|
@@ -29,7 +29,7 @@ export function makeBearingArrowPointers(map:any, darkMode:boolean,layerspercate | |
filter: ["!=", 0, ['get', 'bearing']], | ||
paint: { | ||
'icon-color': ['get', 'contrastdarkmodebearing'], | ||
'icon-opacity': 0.4 | ||
'icon-opacity': 0.6 | ||
}, | ||
layout: { | ||
'icon-image': 'pointingcoloured', | ||
|
@@ -40,7 +40,7 @@ export function makeBearingArrowPointers(map:any, darkMode:boolean,layerspercate | |
'icon-offset': busbearingoffset, | ||
'icon-size': busbearingiconsize | ||
}, | ||
minzoom: 8 | ||
minzoom: 12 | ||
}); | ||
|
||
map.addLayer({ | ||
|
@@ -52,7 +52,7 @@ export function makeBearingArrowPointers(map:any, darkMode:boolean,layerspercate | |
'icon-color': ['get', 'contrastdarkmodebearing'], | ||
'icon-opacity': 0.6 | ||
}, | ||
minZoom: 2, | ||
minZoom: 6, | ||
layout: { | ||
'icon-image': 'pointingcoloured', | ||
'icon-allow-overlap': true, | ||
|
@@ -73,6 +73,7 @@ export function makeBearingArrowPointers(map:any, darkMode:boolean,layerspercate | |
'icon-color': ['get', 'contrastdarkmodebearing'], | ||
'icon-opacity': 0.6 | ||
}, | ||
minZoom: 10, | ||
layout: { | ||
'icon-image': 'pointingcoloured', | ||
'icon-allow-overlap': true, | ||
|
@@ -93,14 +94,15 @@ export function makeBearingArrowPointers(map:any, darkMode:boolean,layerspercate | |
'icon-color': ['get', 'contrastdarkmodebearing'], | ||
'icon-opacity': 0.6 | ||
}, | ||
minZoom: 10, | ||
layout: { | ||
'icon-image': 'pointingcoloured', | ||
'icon-allow-overlap': true, | ||
'icon-ignore-placement': true, | ||
'icon-rotate': ['get', 'bearing'], | ||
'icon-rotation-alignment': 'map', | ||
'icon-offset': railbearingoffset, | ||
'icon-size': railbearingiconsize | ||
'icon-offset': busbearingoffset, | ||
'icon-size': busbearingiconsize | ||
} | ||
}); | ||
|
||
|
@@ -130,116 +132,5 @@ export function makeBearingArrowPointers(map:any, darkMode:boolean,layerspercate | |
} | ||
|
||
}) | ||
|
||
|
||
|
||
|
||
map.loadImage('./icons/pointing-shell.png', (error, image) => { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
if (error) throw error; | ||
|
||
if (image) { | ||
|
||
map.addImage('pointingshell', image); | ||
|
||
map.addLayer({ | ||
id: layerspercategory.bus.pointingshell, | ||
source: 'buses', | ||
type: 'symbol', | ||
filter: ["!=", 0, ['get', 'bearing']], | ||
paint: { | ||
'icon-opacity': ['interpolate', ['linear'], ['zoom'], 2, 0, 2.5, 0.9, 5, 0.8, 9, 0.6, 11.5, 0.8] | ||
}, | ||
layout: { | ||
'icon-image': darkMode == true ? 'pointingshell' : 'pointingshelllight', | ||
'icon-allow-overlap': true, | ||
'icon-ignore-placement': true, | ||
'icon-rotate': ['get', 'bearing'], | ||
'icon-rotation-alignment': 'map', | ||
'icon-offset': busbearingoffset, | ||
'icon-size': busbearingiconsize | ||
}, | ||
minzoom: 8 | ||
}); | ||
|
||
map.addLayer({ | ||
id: layerspercategory.intercityrail.pointingshell, | ||
source: 'intercityrail', | ||
type: 'symbol', | ||
filter: ["!=", 0, ['get', 'bearing']], | ||
paint: { | ||
'icon-opacity': ['interpolate', ['linear'], ['zoom'], 9, 0.3, 11.5, 0.8] | ||
}, | ||
minZoom: 2, | ||
layout: { | ||
'icon-image': darkMode == true ? 'pointingshell' : 'pointingshelllight', | ||
'icon-allow-overlap': true, | ||
'icon-ignore-placement': true, | ||
'icon-rotate': ['get', 'bearing'], | ||
'icon-rotation-alignment': 'map', | ||
'icon-offset': railbearingoffset, | ||
'icon-size': railbearingiconsize | ||
}, | ||
}); | ||
|
||
map.addLayer({ | ||
id: layerspercategory.localrail.pointingshell, | ||
source: 'localrail', | ||
type: 'symbol', | ||
filter: ["!=", 0, ['get', 'bearing']], | ||
paint: { | ||
'icon-opacity': ['interpolate', ['linear'], ['zoom'], 9, 0.3, 11.5, 0.8] | ||
}, | ||
layout: { | ||
'icon-image': darkMode == true ? 'pointingshell' : 'pointingshelllight', | ||
'icon-allow-overlap': true, | ||
'icon-ignore-placement': true, | ||
'icon-rotate': ['get', 'bearing'], | ||
'icon-rotation-alignment': 'map', | ||
'icon-offset': railbearingoffset, | ||
'icon-size': railbearingiconsize | ||
}, | ||
}); | ||
|
||
map.addLayer({ | ||
id: layerspercategory.other.pointingshell, | ||
source: 'other', | ||
type: 'symbol', | ||
filter: ["!=", 0, ['get', 'bearing']], | ||
paint: { | ||
'icon-opacity': ['interpolate', ['linear'], ['zoom'], 9, 0.3, 11.5, 0.8] | ||
}, | ||
layout: { | ||
'icon-image': darkMode == true ? 'pointingshell' : 'pointingshelllight', | ||
'icon-allow-overlap': true, | ||
'icon-ignore-placement': true, | ||
'icon-rotate': ['get', 'bearing'], | ||
'icon-rotation-alignment': 'map', | ||
'icon-offset': railbearingoffset, | ||
'icon-size': railbearingiconsize | ||
}, | ||
}); | ||
|
||
//usergeo | ||
|
||
map.addLayer({ | ||
id: "geolocationheadingshell", | ||
source: 'geolocation', | ||
type: 'symbol', | ||
filter: ["!=", null, ['get', 'heading']], | ||
paint: { | ||
'icon-opacity': ['interpolate', ['linear'], ['zoom'], 9, 0.3, 11.5, 0.8] | ||
}, | ||
layout: { | ||
'icon-image': darkMode == true ? 'pointingshell' : 'pointingshelllight', | ||
'icon-allow-overlap': true, | ||
'icon-ignore-placement': true, | ||
'icon-rotate': ['get', 'heading'], | ||
'icon-rotation-alignment': 'map', | ||
'icon-offset': geobearingoffset, | ||
'icon-size': railbearingiconsize | ||
}, | ||
}); | ||
} | ||
}) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Circles should be slightly transparent, I don't think this was a good idea