Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

255
Visualizações
Datamaps JS Dynamically get data from json file at regular intervals

I want to be able to create a dynamic threat map to display the cyber attacks. I'm able to create the map and display all the co-ordinates directly but how do I achieve it dynamically ?

<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script>
<script src="datamaps.world.min.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script>
<div id="container" style="position: relative; width: 100%; height:100%;"></div>
<script>

  var cyber = new Datamap({
    scope: 'world',
    element: document.getElementById('container'),
    projection: 'mercator',
    fills: {
        defaultFill: '#000000',
        HIGH: '#3288BD',
        LOW: '#D53E4F'
  },
 arcConfig: {
  strokeColor: '#DD1C77',
  strokeWidth: 1,
  arcSharpness: 2,
  animationSpeed: 2000
}
  });


  var latLong = [{'origin': {'latitude': -33.462500000000006, 'longitude': -70.6682}, 'destination': {'latitude': 30.0771, 'longitude': 31.285899999999998}}, {'origin': {'latitude': 41.12710000000001, 'longitude': -73.4416}, 'destination': {'latitude': 30.293599999999998, 'longitude': 120.16140000000001}}]

  cyber.arc( latLong, {strokeWidth: 1})


</script>
  1. How to dynamically fetch from file containing the json data
  2. Which service to use for dynamic plotting the arcs on the map
  3. Should I use socket.io for real time programming in order to enter the data into the database simultaneously ?

I'm trying to achieve something like this : https://threatmap.checkpoint.com/ThreatPortal/livemap.html

Any help appreciated. Thank you!

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda