Improve station marker appearance
This commit is contained in:
1 parent
c58c6a1b7b
commit
c5b1c81e3d
2 files changed
+17
-11
No files matched your search
@@ -658,11 +658,17 @@ function addPoi(poi, level = 0){
|
|||||||
if(level > 0) poiElement.classList.add('minZoomCull_2');
|
if(level > 0) poiElement.classList.add('minZoomCull_2');
|
||||||
switch(poi.type){
|
switch(poi.type){
|
||||||
case 'station':
|
case 'station':
|
||||||
|
poiDisplay.classList.add('maxZoomCull_4');
|
||||||
poiDisplay.classList.remove('fixedScale');
|
poiDisplay.classList.remove('fixedScale');
|
||||||
poiElement.setAttribute('fill', poi.color ?? '#fff');
|
poiElement.setAttribute('fill', poi.color ?? '#fff');
|
||||||
poiTooltip.innerHTML = poi.name;
|
poiTooltip.innerHTML = poi.name;
|
||||||
poiIcon.innerHTML = poi.shorthand;
|
poiIcon.innerHTML = poi.shorthand;
|
||||||
poiIcon.setAttribute('style', `font-size:400px; stroke:${poi.stroke ?? '#000'}; stroke-width:40px; paint-order:stroke; text-anchor:middle;`);
|
poiIcon.setAttribute('style', `font-size:400px; pointer-events:none; stroke:${poi.stroke ?? '#000'}; stroke-width:40px; paint-order:stroke; text-anchor:middle;`);
|
||||||
|
let stationName = document.createElementNS(svgns, 'text');
|
||||||
|
stationName.innerHTML = poi.nickname ?? poi.name;
|
||||||
|
stationName.setAttribute('style', `transform: translate(0px, 120px); font-size:100px; pointer-events:visible; stroke:${poi.stroke ?? '#000'}; stroke-width:20px; paint-order:stroke; text-anchor:middle;`)
|
||||||
|
stationName.classList.add('minZoomCull_1');
|
||||||
|
poiDisplay.appendChild(stationName);
|
||||||
poiLayers.stations.prepend(poiElement);
|
poiLayers.stations.prepend(poiElement);
|
||||||
break;
|
break;
|
||||||
case 'office':
|
case 'office':
|
||||||
|
|||||||
+10
-10
@@ -74,7 +74,7 @@
|
|||||||
"type":"station",
|
"type":"station",
|
||||||
"shorthand":"CS",
|
"shorthand":"CS",
|
||||||
"color":"#dfd7dc",
|
"color":"#dfd7dc",
|
||||||
"position":{"x":9785.819,"y":134.6823,"z":1488.548},
|
"position":{"x":9785.819,"y":134.6823,"z":1588.548},
|
||||||
"children":[
|
"children":[
|
||||||
{
|
{
|
||||||
"type":"office",
|
"type":"office",
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
"type":"station",
|
"type":"station",
|
||||||
"shorthand":"CW",
|
"shorthand":"CW",
|
||||||
"color":"#f1cdbb",
|
"color":"#f1cdbb",
|
||||||
"position": {"x":1456,"y":122,"z":5692},
|
"position": {"x":1456,"y":122,"z":5792},
|
||||||
"children":[
|
"children":[
|
||||||
{
|
{
|
||||||
"type":"office",
|
"type":"office",
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
"type":"station",
|
"type":"station",
|
||||||
"shorthand":"FF",
|
"shorthand":"FF",
|
||||||
"color":"#b2d1ff",
|
"color":"#b2d1ff",
|
||||||
"position":{"x":9035.343,"y":119.1784,"z":13504.95},
|
"position":{"x":8835.343,"y":119.1784,"z":13504.95},
|
||||||
"children":[
|
"children":[
|
||||||
{
|
{
|
||||||
"type":"office",
|
"type":"office",
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
"type":"station",
|
"type":"station",
|
||||||
"shorthand":"FM",
|
"shorthand":"FM",
|
||||||
"color":"#ffda62",
|
"color":"#ffda62",
|
||||||
"position":{"x":6027.609,"y":123.8593,"z":7074.711},
|
"position":{"x":6027.609,"y":123.8593,"z":7124.711},
|
||||||
"children":[
|
"children":[
|
||||||
{
|
{
|
||||||
"type":"office",
|
"type":"office",
|
||||||
@@ -207,7 +207,7 @@
|
|||||||
"type":"station",
|
"type":"station",
|
||||||
"shorthand":"FRS",
|
"shorthand":"FRS",
|
||||||
"color":"#8db16c",
|
"color":"#8db16c",
|
||||||
"position":{"x":5890.794,"y":175.1235,"z":3787.574},
|
"position":{"x":5790.794,"y":175.1235,"z":3687.574},
|
||||||
"children":[
|
"children":[
|
||||||
{
|
{
|
||||||
"type":"office",
|
"type":"office",
|
||||||
@@ -323,7 +323,7 @@
|
|||||||
"type":"station",
|
"type":"station",
|
||||||
"shorthand":"IMW",
|
"shorthand":"IMW",
|
||||||
"color":"#dc6f54",
|
"color":"#dc6f54",
|
||||||
"position":{"x":2163.091,"y":133.5531,"z":13759.38},
|
"position":{"x":2583.091,"y":133.5531,"z":13559.38},
|
||||||
"children":[
|
"children":[
|
||||||
{
|
{
|
||||||
"type":"office",
|
"type":"office",
|
||||||
@@ -368,7 +368,7 @@
|
|||||||
"type":"station",
|
"type":"station",
|
||||||
"shorthand":"MF",
|
"shorthand":"MF",
|
||||||
"color":"#ffad6d",
|
"color":"#ffad6d",
|
||||||
"position":{"x":2848.254,"y":159.2693,"z":10523.74},
|
"position":{"x":2900.254,"y":159.2693,"z":10523.74},
|
||||||
"children":[
|
"children":[
|
||||||
{
|
{
|
||||||
"type":"office",
|
"type":"office",
|
||||||
@@ -405,7 +405,7 @@
|
|||||||
"type":"station",
|
"type":"station",
|
||||||
"shorthand":"OR",
|
"shorthand":"OR",
|
||||||
"color":"#cf6884",
|
"color":"#cf6884",
|
||||||
"position":{"x":6934.917,"y":143.8076,"z":11133.96},
|
"position":{"x":6900.917,"y":143.8076,"z":11033.96},
|
||||||
"children":[
|
"children":[
|
||||||
{
|
{
|
||||||
"type":"office",
|
"type":"office",
|
||||||
@@ -427,7 +427,7 @@
|
|||||||
"type":"station",
|
"type":"station",
|
||||||
"shorthand":"OWC",
|
"shorthand":"OWC",
|
||||||
"color":"#7b6f6e",
|
"color":"#7b6f6e",
|
||||||
"position":{"x":4466.821,"y":122.9323,"z":6651.179},
|
"position":{"x":4866.821,"y":122.9323,"z":5851.179},
|
||||||
"children":[
|
"children":[
|
||||||
{
|
{
|
||||||
"type":"office",
|
"type":"office",
|
||||||
@@ -469,7 +469,7 @@
|
|||||||
"type":"station",
|
"type":"station",
|
||||||
"shorthand":"SM",
|
"shorthand":"SM",
|
||||||
"color":"#ac9da2",
|
"color":"#ac9da2",
|
||||||
"position": {"x":8321,"y":131,"z":6707},
|
"position": {"x":8021,"y":131,"z":6707},
|
||||||
"children":[
|
"children":[
|
||||||
{
|
{
|
||||||
"type":"office",
|
"type":"office",
|
||||||
|
|||||||
Reference in new issue
Block a user