Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

285
Views
Arc.js no dibuja la línea en OpenLayers 6

mi codigo es

 const testSource = new VectorSource({ loader: () => { const start2 = { x: 43.449928, y: 39.956589 }; const end2 = { x: 55.606186, y: 49.278728 }; const generator = new arc.GreatCircle(start2, end2); const line = generator.Arc(100, { offset: 10 }); const features = []; line.geometries.forEach((geometry) => { const line = new LineString(geometry.coords); line.transform('EPSG:4326', 'EPSG:3857'); const style = new Style({ stroke: new Stroke({ color: '#EAE911', width: 2, }), }); features.push(new Feature({ geometry: line })); features.forEach((feature) => { feature.setStyle(style); testSource.addFeature(feature); }); }); }, }); const vectorLineLayer = new VectorLayer({ className: 'drawing-layer', source: testSource, }); mapReference.addLayer(vectorLineLayer);

Puedo ver que la fuente existe dentro de mi capa pero no dibujará sin importar lo que haga, ¿alguna idea? No es un problema de zIndex porque tengo mi vectorLayer CSS establecido en zIndex.

EDIT 5/2/2022 resulta que esta línea me estaba dando problemas,

 line.transform('EPSG:4326', 'EPSG:3857');

de alguna manera estaba convirtiendo mis coordenadas planas en una locura de latitud/longitud. eliminarlo ahora muestra mis líneas curvas

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!