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

287
Views
Cómo agregar un símbolo en el centro de la línea y hacer que la flecha se alinee con el punto final de la línea en Mapbox

Creé el mapa con Mapbox, pero tuve algunos problemas. Cuando intento colocar el ícono en el centro de la línea y agregar la flecha al punto final de la línea, siempre falla.

Agregué marcadores en el Aeropuerto Internacional Jorge Chavez (LIM) y el Aeropuerto Internacional Alejandro Velasco Astete (CUZ)

 const marker1 = new mapboxgl.Marker({ color: '#5C7F74',scale:'0.8'}) .setLngLat([-77.11174632225463, -12.02384281134897]) .addTo(map); const marker3 = new mapboxgl.Marker({ color: '#8BAAA1',scale:'0.5'}) .setLngLat([-70.15810500000016,-15.469970999998012]) .addTo(map);

luego agregue una línea al mapa, hasta ahora está bien, pero no sé cómo crear nuevas capas, agregar flechas alineadas con el punto final de la línea o agregar un símbolo en el centro de la línea

 map.on('load', () => { map.addSource('route', { 'type': 'geojson', 'data': { 'type': 'Feature', 'properties': {}, 'geometry': { 'type': 'LineString', 'coordinates': [ [-70.15810500000016,-15.469970999998012],[-77.10670100000081,-12.030560999998116] ] } } }); map.addLayer({ 'id': 'route', 'type': 'line', 'source': 'route', 'layout': { 'line-join': 'round', 'line-cap': 'round', 'line-miter-limit': 2 }, 'paint': { 'line-color': '#888', 'line-width': 3, 'line-dasharray':[2,2] } }); });

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!