Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

233
Vistas
Draw polyline from coordinates broke map in ArcGis Javascript 3.x WebAppBuilder

I'm new with ArcGis WebAppbuilder. I am building my own custom widget with which I draw a polyline on the map from the coordinates of a satellite. I have a given starting TLE,for example:

LEMUR-2-TENNYSONLILY
1 52732U 22057A 22171.76649313 .00007639 00000+0 45185-3 0 9997 2 52732 97.5213 286.3842 0010146 168.0171 192.1302 15.11692075 3937

I use Esri's function for converting to coordinates of this TLE which gives me in output: x: 106.18417662732989, y: 6.539393499416327. these coordinates then change based on a timestamp that changes from hour to hour given a start date and an end date.

With these coordinates I use the whole point construction procedure the esri method, create an array of points, add it to the polyline with .addPath() and everything works.

let date1 = new Date(this.dt1.value);
        let date2 = new Date(this.dt2.value);
        let hours = Math.round(Math.abs(date1 - date2) / 36e5);
        let stampa = date1;
        let polylineSymbol = new SimpleLineSymbol();
        let polylineSymbol2 = new SimpleLineSymbol();
        let coordinate = [];
        let array = new Array(2);
        let arrayTest= [];


        for (let i = 0; i < hours; i++) {
              stampa = this.addHours(1, date1);
              coordinate[i] = this.getSatelliteLocation(stampa, this.line1.value, this.line2.value);

              array[i] = new Point( [coordinate[i].x , coordinate[i].y], new SpatialReference({wkid: 102113}));
            // console.log(array[0])
              arrayTest.push(new Point( [coordinate[i].x , coordinate[i].y ], new SpatialReference({wkid: 102113})));
        }
              console.log(arrayTest)

        let polyline = new Polyline(new SpatialReference({wkid: 102113}))
            polyline.addPath(arrayTest);
            polyline = webMercatorUtils.geographicToWebMercator(polyline);
        this.map.graphics.clear();
        this.map.graphics.add(new Graphic(polyline, polylineSymbol2));

The problem is that it always remains limited to one portion of the map and if I try to invert the coordinates it comes off the screen.

enter image description here

I have tried testing different SpatialReference and related "wkid" but it keeps giving me the same problem.

Can you tell me if I am forgetting something? I thank you for any reply

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda