UNPKG

thematic-earth

Version:

HTML-based, whole-Earth thematic maps using locally hosted data layers

2 lines 8.24 kB
/* Copyright (c) 2023 Read Write Tools. Legal use subject to the Thematic Earth Software License Agreement. */ import LegendConsts from'../legend/legend-consts.js';import LegendFeaturePoint from'../legend/legend-feature-point.class.js';export function SymbolBox(){var e=LegendConsts.symbolTopMargin,n=LegendConsts.symbolLeftMargin,o=e+LegendConsts.symbolBoxHeight,t=n+LegendConsts.symbolBoxWidth;return arrayToLegendFeaturePoints([[n,e],[n,o],[t,o],[t,e]])}export function Place(){return arrayToLegendFeaturePoints([[LegendConsts.symbolBoxWidth/2,LegendConsts.symbolBoxHeight/2]])}export function HorizontalLine(){return arrayToLegendFeaturePoints([[LegendConsts.symbolPadding,LegendConsts.symbolBoxHeight/2],[LegendConsts.symbolBoxWidth-LegendConsts.symbolPadding,LegendConsts.symbolBoxHeight/2]])}export function VerticalLine(){return arrayToLegendFeaturePoints([[LegendConsts.symbolBoxWidth/2,LegendConsts.symbolPadding],[LegendConsts.symbolBoxWidth/2,LegendConsts.symbolBoxHeight-LegendConsts.symbolPadding]])}export function Arc(){return arrayToLegendFeaturePoints([[3.392857,122.5766],[4.241071,120.57143],[5.133929,118.65179],[6.428571,116.15179],[7.991072,113.91965],[9.776786,111.68751],[11.964286,109.94643],[14.241071,108.51786],[17.366071,107.58036],[20.401786,106.91072],[23.616072,106.73215],[26.830357,106.86608],[30.357143,107.35715],[34.107143,108.42858],[36.875,109.63393],[39.553572,111.50893],[41.875,113.87501],[44.017857,116.95536],[45.357143,119.81251],[46.339286,122.46293]])}export function River(){return arrayToLegendFeaturePoints([[2.053571,16.236348],[3.303813,16.79419],[4.425063,17.696091],[7.161399,18.571933],[9.076834,18.182672],[11.265904,17.01488],[12.542861,15.263197],[14.114802,13.435773],[14.732143,10.71479],[14.733743,8.78432],[15.212861,8.12009],[16.004478,7.813],[17.857157,7.94693],[20.178585,8.48265],[20.915193,9.19693],[21.3393,10.08979],[21.9643,12.41122],[21.9643,15.17908],[21.785728,17.85765],[22.678585,19.19693],[24.017871,20.35765],[25.982157,21.25051],[28.125014,21.33981],[29.910728,20.00053],[30.7143,18.39338],[31.238253,16.03404],[32.0761,14.80524],[33.292753,13.82898],[36.071443,13.66124],[37.767871,14.37553],[39.017871,16.07195],[39.553586,18.48267],[39.222593,20.73013],[39.618963,21.74701],[40.267871,22.32195],[42.500014,22.6791],[43.868624,22.00721],[44.732157,20.89338],[46.071443,18.39338],[46.868669,16.51483],[47.712396,15.82622],[48.808662,15.57956]])}export function Route(){return arrayToLegendFeaturePoints([[3.34613,125.5773],[12.563772,122.69387],[17.361997,113.26352],[25.253814,110.52713],[29.610097,104.77393],[39.522219,104.06218],[47.350901,101.6022]])}export function Rectangle(){return arrayToLegendFeaturePoints([[0,0],[0,LegendConsts.symbolBoxHeight],[LegendConsts.symbolBoxWidth,LegendConsts.symbolBoxHeight],[LegendConsts.symbolBoxWidth,0],[0,0]])}export function Space(){return arrayToLegendFeaturePoints([[0,0],[0,LegendConsts.symbolBoxHeight],[LegendConsts.symbolBoxWidth,LegendConsts.symbolBoxHeight],[LegendConsts.symbolBoxWidth,0],[0,0]])}export function Lake(){return arrayToLegendFeaturePoints([[12.151214,104.05016],[12.621534,103.36775],[13.75,102.75001],[15.125,102.82011],[16.4375,103.43753],[18.125,105.12503],[19.4375,106.25003],[20.4375,106.87503],[21.5,106.81253],[22.4375,105.68753],[23.378791,103.43027],[23.810604,102.52386],[24.375,101.75003],[25.5,101.31253],[26.625,101.56253],[27.283146,102.15249],[27.875,102.87503],[29,105.68753],[29.569757,106.53318],[30.120233,106.97003],[32.731694,107.69479],[34.745233,108.03664],[35.981532,107.95584],[36.886374,107.7093],[37.878791,106.99245],[38.424881,106.29926],[39.004116,105.89334],[39.5,105.75003],[40.128791,105.90249],[40.625,106.18753],[41.8125,107.37503],[42.432138,108.41543],[42.875,109.50003],[43.375,112.12503],[44.1875,114.25003],[45.014515,115.37156],[46.125,116.18753],[47.825892,116.87263],[47.825892,116.87263],[46.158146,117.36431],[44.570083,118.07011],[43.1875,119.00003],[42.46875,119.71878],[41.716854,120.79108],[40.875,122.25003],[40.202665,123.34156],[39.355124,124.05338],[38.375,124.50003],[37.568187,124.83652],[36.5625,125.06253],[34.8125,125.00003],[33.5625,124.43753],[32.84443,123.58648],[31.850562,122.07748],[30.514189,121.10986],[28.3125,120.62503],[26.1875,120.62503],[24.25,121.31253],[22.125,122.56253],[20.1875,123.93753],[18.507257,125.17995],[17.125,126.00003],[16,126.26487],[15.194757,125.85672],[14.757257,125.04422],[14.441291,124.066],[14.125,122.25003],[13.8125,121.12503],[13.018956,120.4306],[11.834597,120.03128],[10.639189,119.9192],[9.5,119.81251],[8.661612,119.41195],[7.977903,118.63573],[6.8125,116.68751],[5.9375,113.93751],[5.60859,112.84912],[5.125,111.93751],[4.25,110.93751],[2.812499,110.12725],[5.625,109.31251],[8.1875,108.37501],[10,107.37501],[10.909391,106.70379],[11.21875,106.32814],[11.625,105.58595],[11.875,104.81251]])}export function Circle(){return arrayToLegendFeaturePoints([[24.353189,99.881],[23.558408,99.92419],[22.672981,100.02147],[21.71828,100.204],[21.044995,100.36484],[20.219471,100.60693],[19.328578,100.95221],[18.344622,101.40967],[17.412548,101.93238],[16.642723,102.44123],[15.777165,103.09435],[15.02777,103.78976],[14.372053,104.46231],[13.774818,105.18747],[13.224133,105.95175],[12.714581,106.75889],[12.205536,107.70935],[11.778558,108.68435],[11.417784,109.76665],[11.134957,110.87374],[10.935119,112.18748],[10.866469,113.39912],[10.895639,114.71967],[11.020642,115.81497],[11.212361,116.80426],[11.413037,117.52613],[11.63191,118.20088],[11.884787,118.87884],[12.197345,119.5912],[12.532042,120.23271],[12.829277,120.76213],[13.126931,121.23368],[13.529533,121.80412],[13.96341,122.36569],[14.495121,122.96975],[14.986244,123.46975],[15.507501,123.95759],[15.996269,124.36667],[16.534779,124.78262],[17.212277,125.24696],[17.915422,125.66315],[18.745706,126.09682],[19.633549,126.48091],[20.658986,126.8357],[21.710389,127.11509],[22.657481,127.27687],[23.091396,127.33477],[24.051951,127.41587],[24.963965,127.41503],[25.858561,127.36993],[26.765806,127.25489],[27.755991,127.06475],[28.572043,126.84121],[29.287262,126.59688],[29.95472,126.34481],[30.703551,126.00412],[31.31063,125.6864],[31.970708,125.29018],[32.52221,124.9296],[33.037265,124.54483],[33.552698,124.12584],[34.045298,123.69006],[34.571494,123.15633],[35.056737,122.62935],[35.467923,122.13225],[35.778313,121.71774],[36.168399,121.1349],[36.468936,120.65732],[36.764589,120.12643],[37.041877,119.58169],[37.298035,119.02703],[37.522946,118.46081],[37.720062,117.89926],[37.909977,117.25903],[38.07746,116.57209],[38.22822,115.7623],[38.336385,114.86526],[38.387555,113.90071],[38.373475,113.04333],[38.305715,112.20371],[38.20132,111.38487],[38.041272,110.55081],[37.86957,109.89117],[37.683885,109.31022],[37.391152,108.50875],[37.133029,107.91857],[36.768241,107.18354],[36.424574,106.57303],[36.080241,106.00755],[35.688287,105.45551],[35.284276,104.94678],[34.862111,104.44981],[34.311379,103.87716],[33.647912,103.2488],[32.900994,102.65837],[32.380859,102.28192],[31.762658,101.88825],[31.148028,101.5348],[30.509774,101.20627],[29.872667,100.93178],[29.083667,100.62977],[28.454519,100.43105],[27.656601,100.20688],[26.436406,99.991496],[25.353495,99.902936]])}export function Territory(){return arrayToLegendFeaturePoints([[3.724938,109.67418],[3.661803,125.96289],[32.261747,125.89979],[32.324887,121.79605],[42.363277,121.85915],[42.363277,125.89976],[46.78269,125.89976],[46.84582,112.4521],[45.961937,111.25255],[45.456861,109.67418],[45.267457,108.09582],[44.131035,107.52761],[44.131035,106.07551],[44.636112,104.93909],[45.519995,103.36073],[45.898802,101.90864],[44.951784,101.15102],[43.120883,101.15102],[41.795058,101.40356],[40.279829,101.90864],[38.954004,102.85565],[36.807429,103.10819],[35.41847,102.47685],[33.019357,102.16117],[32.324878,102.91879],[31.314725,103.61327],[28.473671,103.487],[27.842326,102.53998],[24.748733,102.85565],[23.991119,104.93909],[20.644989,105.57044],[19.887374,107.21194],[18.561549,108.22209],[16.983186,109.98986],[14.773477,110.30553],[11.806154,111.75762],[9.154503,111.82072],[7.386736,111.63132],[5.682104,110.74744]])}function arrayToLegendFeaturePoints(e){var n=[];for(let o=0;o<e.length;o++)n.push(new LegendFeaturePoint(e[o][0],e[o][1]));return n}