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

237
Views
¿Hay alguna manera de rotar el marcador para alinearlo con la carretera usando el folleto en un mapa?

Estoy tratando de alinear mi vehículo en la dirección de la carretera usando un mapa, pero parece que no puedo entender cómo hacerlo. a) No puedo encontrar una manera de obtener la dirección hacia la cabeza para rotar el marcador

 displayMarkers(info: { location: number[]; name: string; plate: string; }){ var greenIcon = L.icon({ iconUrl: '/assets/images/truck-top.png', iconSize: [40, 30], // size of the icon shadowSize: [50, 64], // size of the shadow iconAnchor: [20, 20], // point of the icon which will correspond to marker's location shadowAnchor: [4, 62], // the same for the shadow popupAnchor: [-3, -26] // point from which the popup should open relative to the iconAnchor }); var loc = info['location'] //console.log([location[0],location[1]]); var DriverName =info['name'] var plateNo= info['plate'] //add the popUp HTML var customPopup = ` <p style="margin-bottom:10px"><b>PlateNumber: ${plateNo} </b></p> <p style="margin:0px"><b>Trucker name: ${DriverName}</b></p> <hr style="width:100%", size="1", color=black> <p style="color:red;margin:0px">Dispalys if any alert raised in vehicle</p> `; // specify popup options var customOptions = { 'maxWidth': '400', 'width': '200', 'className' : 'popupCustom' } //! add the marker and attach popup const marker= L.marker([loc[0],loc[1]],{icon: greenIcon}).addTo(this.map); marker.bindPopup(customPopup) }

Esta es mi función de marcador y la imagen del mapa .

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!