Improved FiresMap (makers checkbox, better calcs, etc)
This commit is contained in:
parent
fe7a314d92
commit
2e36c9cd17
13 changed files with 496 additions and 104 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -4,4 +4,4 @@ settings-staging.json
|
|||
settings-production.json
|
||||
settings-development.json
|
||||
imports/ui/stylesheets/.sass-cache/
|
||||
public/GeoLite2-City.mmdb.gz
|
||||
private/GeoLite2-City.mmdb*
|
||||
|
|
|
|||
|
|
@ -40,6 +40,5 @@ gadicc:blaze-react-component # Add braze to react
|
|||
mixmax:smart-disconnect # Disconnect on lost focus
|
||||
flowkey:raven # js errors
|
||||
davidsichau:piwik # Stats
|
||||
thebakery:ipgeocoder
|
||||
mdg:geolocation
|
||||
natestrauser:publish-performant-counts
|
||||
|
|
|
|||
|
|
@ -104,7 +104,6 @@ templating@1.3.2
|
|||
templating-compiler@1.3.3
|
||||
templating-runtime@1.3.2
|
||||
templating-tools@1.1.2
|
||||
thebakery:ipgeocoder@0.1.2
|
||||
themeteorchef:bert@2.1.3
|
||||
tmeasday:check-npm-versions@0.3.1
|
||||
tracker@1.1.3
|
||||
|
|
|
|||
354
designs/icons-tcef.svg
Normal file
354
designs/icons-tcef.svg
Normal file
|
|
@ -0,0 +1,354 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
sodipodi:docname="icons-tcef.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
inkscape:export-filename="/mnt/md1/proyectos/dev/todos-contra-el-fuego-web/public/fire-marker.png"
|
||||
inkscape:export-xdpi="6"
|
||||
inkscape:export-ydpi="6">
|
||||
<defs
|
||||
id="defs2">
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect8561"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8559"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00885213"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect8555"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8553"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00885213"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect8549"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8547"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00885213"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect8543"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8541"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00885213"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect8537"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8535"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00885213"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect8531"
|
||||
is_visible="true" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8529"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00885213"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8525"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00885213"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8521"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00885213"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8517"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00885213"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8513"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00885213"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8509"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00885213"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8505"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00108696"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="powerstroke"
|
||||
id="path-effect8501"
|
||||
is_visible="true"
|
||||
offset_points="0,0.13229166"
|
||||
sort_points="true"
|
||||
interpolator_type="CubicBezierJohan"
|
||||
interpolator_beta="0.2"
|
||||
start_linecap_type="zerowidth"
|
||||
linejoin_type="extrp_arc"
|
||||
miter_limit="4"
|
||||
end_linecap_type="zerowidth" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8499"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00108696"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8495"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00108696"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
<inkscape:path-effect
|
||||
effect="simplify"
|
||||
id="path-effect8491"
|
||||
is_visible="true"
|
||||
steps="1"
|
||||
threshold="0.00108696"
|
||||
smooth_angles="360"
|
||||
helper_size="0"
|
||||
simplify_individual_paths="false"
|
||||
simplify_just_coalesce="false"
|
||||
simplifyindividualpaths="false"
|
||||
simplifyJustCoalesce="false" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.49497475"
|
||||
inkscape:cx="79.419557"
|
||||
inkscape:cy="458.62586"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="983"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="867"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Capa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<g
|
||||
style="fill:#ff0000;stroke-width:2.49893761"
|
||||
transform="matrix(0.15677218,0,0,0.1664724,228.27679,-31.257925)"
|
||||
id="g3415">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3417"
|
||||
d="m -1175.4664,736.62077 c -33.3138,-46.82732 -77.1492,-115.69563 -102.6366,-161.24879 -11.7453,-20.99204 -30.2969,-58.12091 -37.2515,-74.55449 -7.183,-16.97323 -15.1659,-40.43141 -18.3579,-53.94551 -3.2265,-13.66018 -3.2134,-40.78621 0.027,-56 13.0118,-61.09044 54.0725,-108.07064 111.0233,-127.02878 21.0744,-7.01539 29.7628,-8.3724 53.6051,-8.3724 18.0191,0 22.4905,0.32004 31.5,2.2546 69.2952,14.87936 118.3985,63.98934 133.1284,133.14658 3.2404,15.21379 3.2535,42.33982 0.027,56 -9.6695,40.93833 -34.9549,94.97325 -78.2137,167.1432 -22.584,37.67742 -55.6479,88.3297 -80.0323,122.60559 -5.6923,8.00126 -7.1265,8.00126 -12.8188,0 z m 17.7947,-267.80868 c 16.0798,-3.70704 31.3478,-18.97505 35.0548,-35.05477 1.2978,-5.6293 1.2978,-17.14138 0,-22.77068 -3.707,-16.07972 -18.975,-31.34773 -35.0548,-35.05477 -5.6293,-1.29778 -17.1413,-1.29778 -22.7706,0 -16.0798,3.70704 -31.3478,18.97505 -35.0548,35.05477 -1.2978,5.6293 -1.2978,17.14138 0,22.77068 3.6281,15.73725 17.9483,30.40113 33.9401,34.75463 5.5299,1.50543 17.9787,1.66186 23.8853,0.30014 z"
|
||||
style="fill:#ff0000;stroke-width:2.49893761" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3419"
|
||||
d="m -1171.7343,740.159 c -0.8549,-0.98286 -6.7152,-9.21202 -13.0229,-18.28702 -57.6746,-82.97704 -106.6281,-166.52227 -130.6675,-223 -7.5823,-17.81379 -15.6335,-42.59765 -18.1919,-56 -1.9075,-9.99286 -2.1192,-13.59689 -1.615,-27.5 0.6601,-18.20107 2.7364,-29.95437 8.149,-46.12976 16.6315,-49.70266 56.2471,-88.97673 106.1932,-105.27769 18.8485,-6.15159 28.6855,-7.59255 51.8324,-7.59255 23.1469,0 32.9839,1.44096 51.8324,7.59255 49.946,16.30096 89.5617,55.57503 106.1932,105.27769 5.4126,16.17539 7.4889,27.92869 8.149,46.12976 0.5042,13.90311 0.2925,17.50714 -1.615,27.5 -9.8997,51.86069 -57.3486,143.38266 -131.1659,253 -21.9938,32.66028 -31.1985,45.43501 -32.9858,45.77921 -0.842,0.16216 -2.2304,-0.50932 -3.0852,-1.49219 z m 14.484,-270.77869 c 8.8507,-2.30531 15.5691,-6.19896 22.2859,-12.91574 15.3233,-15.32331 18.7123,-37.24354 8.7865,-56.83126 -3.3849,-6.67972 -13.4607,-16.75552 -20.1404,-20.14039 -19.5878,-9.92585 -41.508,-6.53684 -56.8313,8.78647 -19.3033,19.30326 -19.3033,48.88192 0,68.18518 12.3601,12.36013 29.5075,17.18527 45.8993,12.91574 z"
|
||||
style="fill:#ff0000;stroke-width:2.49893761" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3421"
|
||||
d="m -1170.2383,741.02946 c -2.9702,-1.95299 -47.5638,-68.36498 -68.9314,-102.65748 -60.3859,-96.91256 -92.6314,-167.65863 -95.9441,-210.5 -0.71,-9.18142 0.7359,-26.96889 3.1702,-39 5.3885,-26.6314 19.6741,-55.21797 38.1803,-76.40168 33.7565,-38.64042 87.425,-60.38026 137.6514,-55.75937 16.142,1.48508 25.2032,3.34552 39.6542,8.14177 49.5805,16.45568 88.4643,55.33946 104.92,104.92 6.514,19.62659 9.7891,41.9139 8.5375,58.09928 -3.7383,48.34554 -45.5692,134.74542 -120.3123,248.5 -19.0693,29.02239 -43.4664,64.32456 -44.8352,64.87575 -0.5999,0.24157 -1.5406,0.14334 -2.0906,-0.21827 z m 14.3311,-271.55241 c 15.9065,-4.23527 29.72,-18.04873 33.9553,-33.95526 1.7594,-6.60785 1.7594,-19.69177 0,-26.29962 -2.0654,-7.7571 -6.4729,-15.22633 -12.6009,-21.35435 -6.1281,-6.12801 -13.5973,-10.53551 -21.3544,-12.60091 -6.6078,-1.75941 -19.6918,-1.75941 -26.2996,0 -15.9065,4.23527 -29.72,18.04873 -33.9553,33.95526 -1.7594,6.60785 -1.7594,19.69177 0,26.29962 4.169,15.65766 17.9617,29.61638 33.4976,33.90073 6.2073,1.71181 20.4242,1.74078 26.7573,0.0545 z"
|
||||
style="fill:#ff0000;stroke-width:2.49893761" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3423"
|
||||
d="m -1182.2542,723.62198 c -16.7382,-23.96496 -42.0532,-62.31689 -57.2403,-86.71831 -49.2012,-79.05289 -78.8337,-139.03161 -90.7948,-183.77671 -3.6442,-13.63234 -3.6769,-13.92884 -3.6618,-33.25498 0.013,-16.40263 0.3725,-21.16781 2.2647,-30 14.2597,-66.56303 63.458,-115.76695 130.1294,-130.1443 9.1148,-1.96557 13.4023,-2.26427 32.5,-2.26427 19.0977,0 23.3852,0.2987 32.5,2.26427 66.6714,14.37735 115.8697,63.58127 130.1294,130.1443 1.8922,8.83219 2.2519,13.59737 2.2647,30 0.015,19.32614 -0.018,19.62264 -3.6618,33.25498 -11.9611,44.7451 -41.5936,104.72382 -90.7948,183.77671 -25.1343,40.38391 -68.2121,103.96831 -70.4375,103.96831 -0.632,0 -6.5707,-7.7625 -13.1972,-17.25 z m 25.1556,-253.28119 c 21.7615,-5.66814 37.5416,-25.8312 37.5416,-47.96881 0,-26.74861 -22.7514,-49.5 -49.5,-49.5 -22.1376,0 -42.3007,15.78009 -47.9688,37.54155 -7.9007,30.33286 15.8887,61.07445 47.5087,61.39264 3.5969,0.0362 9.1853,-0.62323 12.4185,-1.46538 z"
|
||||
style="fill:#ff0000;stroke-width:2.49893761" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3425"
|
||||
d="m -1173.3221,735.64911 c -14.736,-20.10305 -47.0049,-68.57689 -66.4214,-99.77713 -62.4262,-100.31218 -94.8141,-173.76608 -94.7994,-215 0.019,-52.73909 28.6524,-105.90263 72.9978,-135.53357 69.4255,-46.38905 160.1263,-34.87659 216.3183,27.45683 17.8358,19.78504 32.8422,49.59683 38.0432,75.57674 2.0586,10.28307 3.6096,24.23637 3.6125,32.5 0.017,46.98038 -42.1573,135.99251 -121.7666,257 -16.9567,25.77445 -41.6783,61.54761 -43.1709,62.4701 -0.5199,0.32129 -2.6859,-1.79054 -4.8135,-4.69297 z m 16.6337,-265.22977 c 8.643,-2.30041 16.0792,-6.61994 22.569,-13.10973 19.5461,-19.54606 19.5461,-50.3292 0,-69.87526 -19.546,-19.54606 -50.3292,-19.54606 -69.8752,0 -19.5461,19.54606 -19.5461,50.3292 0,69.87526 6.3152,6.31524 13.9223,10.80572 22.1253,13.06068 6.468,1.778 18.5962,1.80163 25.1809,0.049 z"
|
||||
style="fill:#ff0000;stroke-width:2.49893761" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3427"
|
||||
d="m -1182.3104,722.62198 c -17.5832,-25.21705 -46.9653,-70.02195 -62.463,-95.25 -53.9505,-87.82403 -84.0083,-153.91828 -88.8089,-195.28273 -2.8568,-24.61567 3.9195,-58.05424 17.0874,-84.31906 14.9367,-29.79285 43.0433,-57.89943 72.8361,-72.83609 46.9071,-23.51687 102.2965,-23.51687 149.2036,0 29.7928,14.93666 57.8994,43.04324 72.8361,72.83609 13.1678,26.26482 19.9443,59.70339 17.0874,84.31906 -4.8006,41.36445 -34.8584,107.4587 -88.8089,195.28273 -25.6831,41.80848 -73.2609,112.5 -75.7164,112.5 -0.6739,0 -6.638,-7.7625 -13.2534,-17.25 z m 28.8636,-252.78714 c 14.9934,-5.05091 26.7945,-16.83777 31.8332,-31.79475 2.84,-8.4305 2.849,-22.87899 0.019,-31.27836 -5.0509,-14.99339 -16.8378,-26.79448 -31.7948,-31.83312 -8.4589,-2.8496 -22.8773,-2.8496 -31.3362,0 -14.957,5.03864 -26.7438,16.83973 -31.7948,31.83312 -4.2232,12.53664 -2.2398,30.34688 4.615,41.43896 6.0015,9.71133 16.2078,17.88124 26.9565,21.57806 8.2521,2.83815 23.1644,2.8647 31.5017,0.0561 z"
|
||||
style="fill:#ff0000;stroke-width:2.49893761" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3429"
|
||||
d="m -1177.0361,729.2292 c -12.0748,-17.04099 -42.0178,-61.97211 -55.2177,-82.85722 -54.0333,-85.49299 -89.0481,-156.54229 -98.3182,-199.5 -4.1682,-19.31544 -3.6385,-40.89984 1.5396,-62.72802 17.5765,-74.09457 83.6516,-126.23294 159.9754,-126.23294 76.3238,0 142.3989,52.13837 159.9754,126.23294 5.1781,21.82818 5.7078,43.41258 1.5396,62.72802 -9.2711,42.96238 -44.3741,114.18565 -98.325,199.5 -19.1931,30.35063 -57.9257,87.87564 -62.1857,92.35722 -1.07,1.12557 -2.6032,-0.49583 -8.9834,-9.5 z m 19.386,-257.897 c 18.3977,-4.33663 33.2167,-19.15566 37.5533,-37.55329 6.3215,-26.8182 -10.5958,-54.01281 -37.5533,-60.36715 -31.1031,-7.33152 -61.8773,17.01847 -61.8773,48.96022 0,31.94468 30.7714,56.29242 61.8773,48.96022 z"
|
||||
style="fill:#ff0000;stroke-width:2.49893761" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3431"
|
||||
d="m -1180.3055,723.12198 c -39.6386,-56.78097 -80.8763,-123.18906 -105.5103,-169.91097 -22.6038,-42.87113 -35.6673,-73.90745 -42.9114,-101.94924 -3.2234,-12.47773 -3.3276,-13.49718 -3.2613,-31.88979 0.056,-15.57539 0.462,-20.83205 2.2515,-29.16436 7.1745,-33.40579 21.3734,-59.65036 45.1194,-83.39628 23.7312,-23.73126 49.8284,-37.85761 83.3962,-45.14216 8.7531,-1.89951 13.219,-2.20577 32.1644,-2.20577 18.9454,0 23.4113,0.30626 32.1644,2.20577 33.5678,7.28455 59.665,21.4109 83.3962,45.14216 23.746,23.74592 37.9449,49.99049 45.1194,83.39628 1.7895,8.33231 2.1954,13.58897 2.2515,29.16436 0.066,18.39261 -0.038,19.41206 -3.2614,31.88979 -13.5578,52.48201 -54.8103,131.45948 -120.1942,230.11021 -16.0695,24.24545 -38.9,57.5 -39.4759,57.5 -0.1395,0 -5.2013,-7.0875 -11.2485,-15.75 z m 22.6554,-251.78978 c 18.3977,-4.33663 33.2167,-19.15566 37.5533,-37.55329 6.3215,-26.8182 -10.5958,-54.01281 -37.5533,-60.36715 -31.1031,-7.33152 -61.8773,17.01847 -61.8773,48.96022 0,31.94468 30.7714,56.29242 61.8773,48.96022 z"
|
||||
style="fill:#ff0000;stroke-width:2.49893761" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3433"
|
||||
d="m -1180.3055,723.12198 c -39.6386,-56.78097 -80.8763,-123.18906 -105.5103,-169.91097 -22.6038,-42.87113 -35.6673,-73.90745 -42.9114,-101.94924 -3.2234,-12.47773 -3.3276,-13.49718 -3.2613,-31.88979 0.056,-15.57539 0.462,-20.83205 2.2515,-29.16436 7.1745,-33.40579 21.3734,-59.65036 45.1194,-83.39628 23.7312,-23.73126 49.8284,-37.85761 83.3962,-45.14216 8.7531,-1.89951 13.219,-2.20577 32.1644,-2.20577 18.9454,0 23.4113,0.30626 32.1644,2.20577 33.5678,7.28455 59.665,21.4109 83.3962,45.14216 23.746,23.74592 37.9449,49.99049 45.1194,83.39628 1.7895,8.33231 2.1954,13.58897 2.2515,29.16436 0.066,18.39261 -0.038,19.41206 -3.2614,31.88979 -13.5578,52.48201 -54.8103,131.45948 -120.1942,230.11021 -16.0695,24.24545 -38.9,57.5 -39.4759,57.5 -0.1395,0 -5.2013,-7.0875 -11.2485,-15.75 z m 18.5351,-250.28529 c 13.9837,-2.26924 25.755,-9.26119 33.6522,-19.98875 16.7117,-22.70124 11.9971,-54.88064 -10.4628,-71.41474 -22.7013,-16.7117 -54.8807,-11.99716 -71.4148,10.46282 -22.6861,30.81689 -4.9477,74.57716 32.7855,80.8812 7.2167,1.20568 8.3498,1.21005 15.4399,0.0595 z"
|
||||
style="fill:#ff0000;stroke-width:2.49893761" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3435"
|
||||
d="m -1182.057,512.8323 c -12.7719,-1.98971 -27.5723,-7.86265 -38.5,-15.27721 -6.7621,-4.58817 -18.715,-16.43678 -23.1795,-22.97738 -5.5725,-8.16373 -11.4255,-20.82211 -13.9666,-30.20573 -3.0901,-11.41104 -3.0901,-32.58896 0,-44 2.386,-8.81088 8.3129,-21.90823 13.2408,-29.25941 4.5234,-6.74778 16.4008,-18.72538 23.1996,-23.3953 8.1117,-5.57172 20.7757,-11.43775 30.2057,-13.99136 11.411,-3.09009 32.589,-3.09009 44,0 16.4827,4.46348 31.3856,13.21179 43.1137,25.30869 8.4566,8.72253 12.1221,14.00001 17.4177,25.07797 14.1075,29.51145 10.8829,63.98309 -8.5367,91.25941 -4.9505,6.95336 -15.862,17.66925 -22.8214,22.41216 -7.1793,4.89282 -20.5797,10.88896 -29.3895,13.1507 -9.0307,2.31843 -26.1035,3.24975 -34.7838,1.89746 z m 20.2866,-39.99561 c 13.9837,-2.26924 25.755,-9.26119 33.6522,-19.98875 16.7117,-22.70124 11.9971,-54.88064 -10.4628,-71.41474 -22.7013,-16.7117 -54.8807,-11.99716 -71.4148,10.46282 -22.6861,30.81689 -4.9477,74.57716 32.7855,80.8812 7.2167,1.20568 8.3498,1.21005 15.4399,0.0595 z"
|
||||
style="fill:#ff0000;stroke-width:2.49893761" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3437"
|
||||
d="m -1185.1968,510.46379 c -9.5638,-1.82704 -13.4033,-3.1449 -22.8602,-7.84638 -15.9869,-7.94787 -27.9203,-18.61115 -36.7936,-32.8775 -18.0259,-28.98174 -18.2282,-63.68515 -0.5489,-94.19339 5.4971,-9.48599 20.031,-24.01998 29.517,-29.51703 35.9768,-20.84825 78.4966,-16.44436 108.0375,11.18973 11.4776,10.73666 21.2917,27.07499 25.5075,42.46417 3.0222,11.03221 3.0222,34.34497 0,45.37718 -5.4288,19.81723 -19.3068,39.61882 -35.5413,50.71161 -7.0384,4.80928 -22.265,11.78192 -29.7119,13.60586 -9.043,2.21486 -28.7216,2.78302 -37.6061,1.08575 z m 28.9955,-38.176 c 3.3793,-0.87131 8.7044,-2.9444 11.8334,-4.60688 6.9307,-3.68235 17.6134,-14.51236 21.0981,-21.38895 7.5207,-14.84137 7.5207,-32.99859 0,-47.83996 -3.4847,-6.87659 -14.1674,-17.7066 -21.0981,-21.38895 -15.0624,-8.00281 -33.404,-8.18326 -48.6091,-0.47825 -6.8766,3.48463 -17.7066,14.16736 -21.3889,21.09806 -8.0028,15.06242 -8.1833,33.40399 -0.4783,48.6091 3.362,6.63454 13.9756,17.54668 20.5596,21.13793 11.3138,6.17111 25.8154,8.02092 38.0833,4.8579 z"
|
||||
style="fill:#ff0000;stroke-width:2.49893761" />
|
||||
</g>
|
||||
<g
|
||||
id="g22554"
|
||||
transform="translate(115.99498,49.712132)"
|
||||
inkscape:export-filename="/mnt/md1/proyectos/dev/todos-contra-el-fuego-web/public/fire-marker.png"
|
||||
inkscape:export-xdpi="4.0856881"
|
||||
inkscape:export-ydpi="4.0856881">
|
||||
<path
|
||||
style="fill:#d41300;fill-opacity:1;stroke:none;stroke-width:10.58333302;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m -25.638382,38.048346 c 11.566313,13.887908 17.1215844,22.244854 13.751242,33.868326 -2.465387,8.50265 -8.895424,18.626534 -18.100172,25.532106 -9.204776,6.905572 -20.549951,13.517692 -24.263404,17.728802 -3.71348,4.21108 -9.835779,11.6046 -10.976769,21.82688 -2.725208,24.7073 15.038044,45.63926 39.702238,48.35952 11.289242,1.2311 26.6324564,-5.2645 34.2331684,-10.31973 C 16.308659,169.98901 28.520768,152.76263 31.570884,138.81099 35.854436,119.21732 35.065926,96.385127 23.626002,79.16853 12.946123,63.095807 3.8673424,50.775037 -25.638382,38.048346 Z"
|
||||
id="path5329"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cszzcczasc" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:10.58333302;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m -7.5198746,101.09834 c 4.018254,8.70077 3.821166,14.69136 0.49964,20.18233 -2.429696,4.01667 -7.1125824,8.31964 -12.7749834,10.59336 -5.662401,2.27373 -12.38086,4.1034 -14.860826,5.75067 -2.479966,1.64727 -6.630512,4.59399 -8.617877,9.67322 -4.786736,12.28103 1.27127,26.11038 13.530846,30.8887 5.613373,2.17993 11.515354,2.13146 17.442629,-0.0849 5.9272234,-2.21636 14.0405914,-9.44377 18.0234704,-15.42084 6.3490206,-9.59829 8.9531296,-23.76395 5.4565016,-34.15229 -3.2643496,-9.69812 -4.6224286,-12.3603 -18.6994006,-27.43025 z"
|
||||
id="path5331"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cszzcczcsc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 22 KiB |
|
|
@ -32,15 +32,25 @@ var NullOr = function (type) {
|
|||
});
|
||||
};
|
||||
|
||||
// http://wiki.openstreetmap.org/wiki/Zoom_levels
|
||||
// http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Resolution_and_Scale
|
||||
const zoomMetersPerPixel = [156412, 78206, 39103, 19551, 9776, 4888, 2444, 1222, 610.984, 305.492, 152.746, 76.373, 38.187, 19.093, 9.547, 4.773, 2.387, 1.193, 0.596, 0.298];
|
||||
|
||||
var activefires = function(zoom, lat, lng) {
|
||||
// http://cwestblog.com/2012/11/12/javascript-degree-and-radian-conversion/
|
||||
Math.radians = function(degrees) {
|
||||
return degrees * Math.PI / 180;
|
||||
};
|
||||
|
||||
var activefires = function(zoom, lat, lng, height, width) {
|
||||
// latitude -90 and 90 and the longitude between -180 and 180
|
||||
check(lat, NumberBetween(-90, 90));
|
||||
check(lng, NumberBetween(-180, 180));
|
||||
|
||||
// console.log("Zoom: " + zoom + " lat: " + lat + " lng: " + lng);
|
||||
// console.log("Meters per pixel: " + zoomMetersPerPixel[zoom]);
|
||||
var resolution = 156543.03 * Math.cos(Math.radians(lat)) / Math.pow(2,zoom);
|
||||
// console.log(`Meters per pixel ${zoomMetersPerPixel[zoom]}, resolution ${resolution} meters x pixel`);
|
||||
var distance = Math.trunc(Math.max(resolution*height, resolution*width));
|
||||
// console.log(`so ${height}x${width} gives ${Math.trunc(resolution*height/1000)} x ${Math.trunc(resolution*width/1000)} km, so looking in ${distance}`);
|
||||
|
||||
// console.log(geoData);
|
||||
return ActiveFires.find({
|
||||
|
|
@ -51,16 +61,19 @@ var activefires = function(zoom, lat, lng) {
|
|||
coordinates: [ lng, lat]
|
||||
},
|
||||
$minDistance: 0,
|
||||
$maxDistance: zoomMetersPerPixel[zoom] * 1000
|
||||
$maxDistance: distance
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Meteor.publish('activefiresmyloc', function(zoom, lat, lng) {
|
||||
Meteor.publish('activefiresmyloc', function(zoom, lat, lng, height, width) {
|
||||
check(zoom, validZoom);
|
||||
check(lat, NullOr(Number));
|
||||
check(lng, NullOr(Number));
|
||||
check(height, NullOr(Number));
|
||||
check(width, NullOr(Number));
|
||||
console.log(`Check active fires in ${lat},${lng} with zoom ${zoom} pixels in ${height}x${width} map`)
|
||||
if (lat === null || lng === null) {
|
||||
var clientIP = this.connection.clientAddress;
|
||||
if (clientIP === '127.0.0.1') {
|
||||
|
|
@ -71,5 +84,5 @@ Meteor.publish('activefiresmyloc', function(zoom, lat, lng) {
|
|||
lat = location.latitude;
|
||||
lng = location.longitude;
|
||||
}
|
||||
return activefires(zoom, lat, lng);
|
||||
return activefires(zoom, lat, lng, height, width);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,23 +1,43 @@
|
|||
import { Meteor } from 'meteor/meteor';
|
||||
|
||||
// https://atmospherejs.com/thebakery/ipgeocoder
|
||||
Meteor.startup(function(){
|
||||
// TODO, download from time to time in :public/GeoLite2-City.mmdb.gz
|
||||
// http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
|
||||
IPGeocoder.load(Meteor.absoluteUrl() + 'GeoLite2-City.mmdb.gz');
|
||||
// load() stored it in: /tmp/GeoLite2-City.mmdb
|
||||
});
|
||||
import maxmind from 'maxmind';
|
||||
|
||||
// https://stackoverflow.com/questions/13969655/how-do-you-check-whether-the-given-ip-is-internal-or-not
|
||||
function isPrivateIP(ip) {
|
||||
var parts = ip.split('.');
|
||||
return parts[0] === '10' ||
|
||||
parts[0] === '127' ||
|
||||
(parts[0] === '172' && (parseInt(parts[1], 10) >= 16 && parseInt(parts[1], 10) <= 31)) ||
|
||||
(parts[0] === '192' && parts[1] === '168');
|
||||
}
|
||||
|
||||
Meteor.methods({
|
||||
geo: function() {
|
||||
|
||||
// https://stackoverflow.com/questions/14843232/how-to-get-the-user-ip-address-in-meteor-server/22657421#22657421
|
||||
var clientIP = this.connection.clientAddress;
|
||||
|
||||
if (clientIP === '127.0.0.1') {
|
||||
if (isPrivateIP(clientIP)) {
|
||||
clientIP = '80.58.61.250' // Some Spain IP address
|
||||
}
|
||||
var geoData = IPGeocoder.geocode(clientIP);
|
||||
// console.log(geoData);
|
||||
return geoData;
|
||||
console.log(`Geolocating ${clientIP}`);
|
||||
|
||||
// https://developers.google.com/web/fundamentals/primers/promises
|
||||
var promise = new Promise(function(resolve, reject) {
|
||||
// do a thing, possibly async, then…
|
||||
// TODO: cron download GeoLite-City
|
||||
// http://dev.maxmind.com/geoip/geoip2/geolite2/
|
||||
maxmind.open(process.env.PWD + '/private/GeoLite2-City.mmdb', (err, cityLookup) => {
|
||||
if (err) {
|
||||
reject(console.error(`Failed to geolite ${clientIP}, ${err}`));
|
||||
}
|
||||
else {
|
||||
var city = cityLookup.get(clientIP);
|
||||
// console.log(city);
|
||||
resolve(city);
|
||||
}
|
||||
});
|
||||
})
|
||||
return promise.await();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import Terms from '../../pages/Terms/Terms';
|
|||
import Privacy from '../../pages/Privacy/Privacy';
|
||||
import License from '../../pages/License/License';
|
||||
import ReSendEmail from '../../components/ReSendEmail/ReSendEmail';
|
||||
import Reconnect from '../../components/Reconnect/Reconnect';
|
||||
/* import Reconnect from '../../components/Reconnect/Reconnect';*/
|
||||
// i18n
|
||||
import { I18nextProvider } from 'react-i18next';
|
||||
import i18n from '/imports/startup/client/i18n';
|
||||
|
|
@ -79,7 +79,7 @@ const App = props => (
|
|||
</Grid>
|
||||
<Footer />
|
||||
|
||||
<Reconnect />
|
||||
{/* <Reconnect /> */}
|
||||
<Blaze template="cookieConsent" />
|
||||
{/* <Blaze template="cookieConsentImply" /> */}
|
||||
</div> : ''}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, {Component} from 'react';
|
||||
import { Row, Button } from 'react-bootstrap';
|
||||
import { Row, Button, Checkbox } from 'react-bootstrap';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Trans, Interpolate, translate } from 'react-i18next';
|
||||
|
|
@ -9,20 +9,27 @@ import ActiveFiresCollection from '../../../api/ActiveFires/ActiveFires';
|
|||
import { withTracker } from 'meteor/react-meteor-data';
|
||||
import Loading from '../../components/Loading/Loading';
|
||||
import './FiresMap.scss';
|
||||
import Leaflet from 'leaflet'
|
||||
|
||||
const fireIcon = new Leaflet.Icon({
|
||||
iconUrl: "/fire-marker.png",
|
||||
/* shadowUrl: require('../public/marker-shadow.png'), */
|
||||
iconSize: [16, 24], // size of the icon
|
||||
/* shadowSize: [50, 64], // size of the shadow */
|
||||
iconAnchor: [8, 26], // point of the icon which will correspond to marker's location
|
||||
/* shadowAnchor: [4, 62], // the same for the shadow
|
||||
* popupAnchor: [-3, -76]// point from which the popup should open relative to the iconAnchor*/
|
||||
})
|
||||
|
||||
const MyPopupMarker = ({ children, position }) => (
|
||||
<Marker position={position}>
|
||||
<Popup>
|
||||
// http://leafletjs.com/reference-1.2.0.html#icon
|
||||
const MyPopupMarker = ({ children, lat, lon}) => (
|
||||
<Marker position={[lat, lon]} icon={fireIcon} >
|
||||
{/* <Popup>
|
||||
<span>{children}</span>
|
||||
</Popup>
|
||||
</Popup> */}
|
||||
</Marker>
|
||||
)
|
||||
|
||||
const MyCircle = ({ radius, position }) => (
|
||||
<Circle center={position} color="red" stroke={false} fillOpacity="1" fill={true} radius={radius} />
|
||||
)
|
||||
|
||||
const FireMark = ({ lat, lon, scan }) => (
|
||||
<Circle center={[lat, lon]} color="red" stroke={false} fillOpacity="1" fill={true} radius={scan*1000} />
|
||||
)
|
||||
|
|
@ -34,12 +41,8 @@ const Fire = ({ lat, lon, scan }) => (
|
|||
|
||||
MyPopupMarker.propTypes = {
|
||||
children: MapPropTypes.children,
|
||||
position: MapPropTypes.latlng,
|
||||
}
|
||||
|
||||
MyCircle.propTypes = {
|
||||
radius: PropTypes.number.isRequired,
|
||||
position: MapPropTypes.latlng,
|
||||
lat: PropTypes.number.isRequired,
|
||||
lon: PropTypes.number.isRequired,
|
||||
}
|
||||
|
||||
Fire.propTypes = {
|
||||
|
|
@ -61,19 +64,11 @@ const MyMarkersList = ({ markers }) => {
|
|||
return <div style={{ display: 'none' }}>{items}</div>
|
||||
}
|
||||
|
||||
const MyCirclesList = ({ circles }) => {
|
||||
const items = circles.map(({ key, ...props }) => (
|
||||
<MyCircle key={key} {...props} />
|
||||
))
|
||||
return <div style={{ display: 'none' }}>{items}</div>
|
||||
}
|
||||
|
||||
const FireList = ({ activefires, scale }) => {
|
||||
const FireList = ({ activefires, scale, useMarkers }) => {
|
||||
// console.log("Scaling? :" + scale);
|
||||
const items = activefires.map(({ _id, ...props }) => (
|
||||
scale? <Fire key={_id} {...props} />:
|
||||
<FireMark key={_id} {...props} />
|
||||
))
|
||||
(useMarkers? <MyPopupMarker key={_id} {...props} />:"") +
|
||||
scale? <Fire key={_id} {...props} />:<FireMark key={_id} {...props} />))
|
||||
return <div style={{ display: 'none' }}>{items}</div>
|
||||
}
|
||||
|
||||
|
|
@ -81,10 +76,6 @@ MyMarkersList.propTypes = {
|
|||
markers: PropTypes.array.isRequired,
|
||||
}
|
||||
|
||||
MyCirclesList.propTypes = {
|
||||
circles: PropTypes.array.isRequired,
|
||||
}
|
||||
|
||||
const DEF_LAT = 35.159028;
|
||||
const DEF_LNG = -46.738057;
|
||||
const DEFAULT_VIEWPORT = {
|
||||
|
|
@ -92,44 +83,53 @@ const DEFAULT_VIEWPORT = {
|
|||
zoom: 8,
|
||||
}
|
||||
|
||||
|
||||
|
||||
class FiresMap extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
viewport: DEFAULT_VIEWPORT,
|
||||
modified: false
|
||||
modified: false,
|
||||
userMarkers: true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
centerOnUserLocation = () => {
|
||||
// https://atmospherejs.com/mdg/geolocation
|
||||
// only with SSL:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition
|
||||
|
||||
// https://stackoverflow.com/questions/31608579/somethings-wrong-with-my-meteor-geolocation-functions
|
||||
var userGeoLocation = new ReactiveVar(null);
|
||||
var state = this.state;
|
||||
var self = this;
|
||||
Tracker.autorun(function (computation) {
|
||||
userGeoLocation.set(Geolocation.latLng());
|
||||
if (userGeoLocation.get()) {
|
||||
//stop the tracker if we got something
|
||||
computation.stop();
|
||||
console.log(userGeoLocation.get());
|
||||
state.viewport = {
|
||||
var viewport = {
|
||||
center: [userGeoLocation.get().lat, userGeoLocation.get().lng],
|
||||
zoom: 11
|
||||
}
|
||||
self.onViewportChanged(viewport);
|
||||
// console.log(userGeoLocation.get());
|
||||
computation.stop();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
height.set(this.divElement.clientHeight);
|
||||
width.set(this.divElement.clientWidth);
|
||||
}
|
||||
|
||||
onViewportChanged = viewport => {
|
||||
// console.log(this.state.viewport);
|
||||
// console.log(`Viewport changed: ${JSON.stringify(this.state.viewport)}`);
|
||||
zoom.set(viewport.zoom);
|
||||
lat.set(viewport.center[0]);
|
||||
lng.set(viewport.center[1]);
|
||||
this.state = { viewport: viewport, modified: true };
|
||||
this.state.viewport = viewport;
|
||||
this.state.modified = true
|
||||
}
|
||||
|
||||
onClickReset = () => {
|
||||
|
|
@ -137,24 +137,34 @@ class FiresMap extends React.Component {
|
|||
// this.setState({ viewport: DEFAULT_VIEWPORT })
|
||||
}
|
||||
|
||||
render() {
|
||||
// const position = [this.default.lat, this.default.lng];
|
||||
// const position = this.props.geoip || [this.default.lat, this.default.lng];
|
||||
this.state = {
|
||||
viewport: !this.state.modified && this.props.viewport && Array.isArray(this.props.viewport.center)? this.props.viewport: this.state.viewport,
|
||||
modified: this.state.modified
|
||||
useMarkers = (use) => {
|
||||
this.state.useMarkers = use;
|
||||
this.forceUpdate();
|
||||
}
|
||||
|
||||
render() {
|
||||
this.state.viewport = !this.state.modified && this.props.viewport && Array.isArray(this.props.viewport.center)? this.props.viewport: this.state.viewport;
|
||||
|
||||
return (
|
||||
/* Large number of markers:
|
||||
https://stackoverflow.com/questions/43015854/large-dataset-of-markers-or-dots-in-leaflet/43019740#43019740 */
|
||||
<div>
|
||||
<div
|
||||
ref={ (divElement) => this.divElement = divElement}
|
||||
>
|
||||
{this.props.loading ?
|
||||
<Row className="align-items-center justify-content-center">
|
||||
<Loading />
|
||||
</Row>
|
||||
:""}
|
||||
<h4 className="page-header"><Trans parent="span">Fuegos activos</Trans></h4>
|
||||
<Row>
|
||||
{this.props.activefires.length === 0?
|
||||
<Trans parent="p" i18nKey="noActiveFireInMapCount">No hay fuegos activos en esta zona del mapa. Hay un total de <strong>{{countTotal: this.props.activefirestotal}}</strong> fuegos activos detectados en todo el mundo.</Trans>:
|
||||
<Trans parent="p" i18nKey="activeFireInMapCount">En rojo, <strong>{{count: this.props.activefires.length}}</strong> fuegos activos en el mapa. Hay un total de <strong>{{countTotal: this.props.activefirestotal}}</strong> fuegos activos detectados en todo el mundo.</Trans>
|
||||
}
|
||||
<Checkbox onClick={e => this.useMarkers(e.target.checked)}>
|
||||
<Trans parent="span">Resaltar los fuegos con un marcador</Trans></Checkbox>
|
||||
</Row>
|
||||
<Row>
|
||||
<Map
|
||||
animate={true}
|
||||
|
|
@ -164,39 +174,20 @@ class FiresMap extends React.Component {
|
|||
onViewportChanged={this.onViewportChanged}
|
||||
>
|
||||
{/* http://wiki.openstreetmap.org/wiki/Tile_servers */}
|
||||
{/* <TileLayer
|
||||
attribution="© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors"
|
||||
url="http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png"
|
||||
/> */}
|
||||
{/* <TileLayer
|
||||
attribution="© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors"
|
||||
url="http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png"
|
||||
/> */}
|
||||
<TileLayer
|
||||
attribution="© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors"
|
||||
url="http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png"
|
||||
/>
|
||||
{/* <TileLayer
|
||||
attribution="© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors"
|
||||
url="https://{s}.tiles.mapbox.com/v3/americanredcross.hcji22de/{z}/{x}/{y}.png"
|
||||
<FireList
|
||||
activefires={this.props.activefires}
|
||||
scale={this.state.viewport.zoom > 8}
|
||||
useMarkers={this.state.useMarkers}
|
||||
/>
|
||||
<Circle center={position} color="red" fill={true} radius={scan*1000} />
|
||||
<MyCirclesList circles={circles} />*/}
|
||||
|
||||
<FireList activefires={this.props.activefires} scale={this.state.viewport.zoom > 8} />
|
||||
|
||||
{/* <MyMarkersList markers={markers} /> */}
|
||||
</Map>
|
||||
</Row>
|
||||
<Row>
|
||||
<p>
|
||||
<Interpolate i18nKey="activeFireInMapCount"
|
||||
count={this.props.activefires.length}
|
||||
countTotal={this.props.activefirestotal}
|
||||
></Interpolate>
|
||||
</p>
|
||||
<p>
|
||||
<em><Trans parent="span">Fuentes: NASA y alertas vecinales de nuestr@s usuari@s</Trans></em>
|
||||
<em><Trans parent="span">Fuente NASA y alertas vecinales de nuestr@s usuari@s.</Trans></em>
|
||||
</p>
|
||||
</Row>
|
||||
<Row>
|
||||
|
|
@ -214,6 +205,8 @@ const geoip = new ReactiveVar('');
|
|||
const zoom = new ReactiveVar(8);
|
||||
const lat = new ReactiveVar(DEF_LAT);
|
||||
const lng = new ReactiveVar(DEF_LNG);
|
||||
const height = new ReactiveVar(400);
|
||||
const width = new ReactiveVar(400);
|
||||
|
||||
FiresMap.propTypes = {
|
||||
loading: PropTypes.bool.isRequired,
|
||||
|
|
@ -222,6 +215,14 @@ FiresMap.propTypes = {
|
|||
viewport: PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
Meteor.call("geo", function (error, response) {
|
||||
if (error) {
|
||||
console.warn(error);
|
||||
} else {
|
||||
geoip.set([response.location.latitude, response.location.longitude] );
|
||||
}
|
||||
});
|
||||
|
||||
export default translate([], { wait: true }) (withTracker(() => {
|
||||
var subscription;
|
||||
Meteor.autorun(function() {
|
||||
|
|
@ -230,17 +231,10 @@ export default translate([], { wait: true }) (withTracker(() => {
|
|||
// also stop all subscriptions when this template is destroyed.
|
||||
if (zoom.get())
|
||||
// TODO select position
|
||||
subscription = Meteor.subscribe('activefiresmyloc', zoom.get(), lat.get(), lng.get());
|
||||
subscription = Meteor.subscribe('activefiresmyloc', zoom.get(), lat.get(), lng.get(), height.get(), width.get());
|
||||
});
|
||||
Meteor.subscribe('activefirestotal');
|
||||
// const subscription = Meteor.subscribe('activefiresmyloc', zoom.get());
|
||||
Meteor.call("geo", function (error, response) {
|
||||
if (error) {
|
||||
console.warn(error);
|
||||
} else {
|
||||
geoip.set([response.location.latitude, response.location.longitude] );
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
loading: !subscription.ready(),
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@
|
|||
}
|
||||
|
||||
@media only screen and (max-width: 400px) {
|
||||
/* .leaflet-container {
|
||||
.leaflet-container {
|
||||
height: 500px;
|
||||
width: 85vw;
|
||||
} */
|
||||
}
|
||||
}
|
||||
|
||||
i.location {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import {render} from 'react-dom';
|
|||
import { Link } from 'react-router-dom';
|
||||
// https://www.npmjs.com/package/react-resize-detector
|
||||
import ReactResizeDetector from 'react-resize-detector';
|
||||
import FiresMap from '../FiresMap/FiresMap';
|
||||
|
||||
import './Index.scss';
|
||||
import './Index-custom.scss';
|
||||
|
|
@ -119,6 +120,13 @@ class Index extends Component {
|
|||
<Link className="participe-btn btn btn-lg btn-warning" role="button" to="/signup">{this.props.t('Participa')}</Link>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="py-5">
|
||||
<div className="container">
|
||||
<FiresMap />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
"jquery-validation": "^1.17.0",
|
||||
"juice": "^4.1.1",
|
||||
"lodash": "^4.17.4",
|
||||
"maxmind": "^2.3.0",
|
||||
"meteor-accounts-t9n": "^2.0.3",
|
||||
"meteor-node-stubs": "^0.2.11",
|
||||
"moment": "^2.19.2",
|
||||
|
|
|
|||
BIN
public/fire-marker.png
Normal file
BIN
public/fire-marker.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 720 B |
|
|
@ -112,8 +112,12 @@
|
|||
"Fuegos activos",
|
||||
"Fuegos activos":
|
||||
"Fuegos activos",
|
||||
"noActiveFireInMapCount":
|
||||
"No hay fuegos activos en esta zona del mapa. Hay un total de <1><0>{{countTotal}}</0></1> fuegos activos detectados en todo el mundo.",
|
||||
"activeFireInMapCount":
|
||||
"Fuegos activos en el mapa {{count,number}} de un total de {{countTotal,number}} fuegos activos detectados en el mundo.",
|
||||
"En rojo, <1><0>{{count,number}}</0></1> fuegos activos en el mapa. Hay un total de <3><0>{{countTotal,number}}</0></3> fuegos activos detectados en todo el mundo.",
|
||||
"Centrar el mapa en tu ubicación":
|
||||
"Centrar el mapa en tu ubicación"
|
||||
"Centrar el mapa en tu ubicación",
|
||||
"Fuente NASA y alertas vecinales de nuestr@s usuari@s.":
|
||||
"Fuente NASA y alertas vecinales de nuestr@s usuari@s."
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue