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

310
Visualizações
Laravel 8 fetching coordinates data and display in Google Maps in JavaScript

I have coordinates stored in my database, and I want to fetch those coordinates to display on Google Maps, where the user will click on the link which says like "view on map" in the column table. However, the link will redirect to that map based on stored coordinates from the database, and I don't know how to fetch those coordinates from the database with JavaScript.

var map;
var myLatLng;

function initMap() {
  
  var loc = { lat: -74.17972, lng:34.56445312 };
 
  
  var map = new google.maps.Map(document.getElementById("map"), {
    zoom: 8,
    center: loc,
  });
  
  var marker = new google.maps.Marker({
    position: loc,
    map: map,
    draggable: true
  });
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I believe the way to make client js talks to you db , will be through an API Call by Ajax.

You can create an Api route and controller function to handle query the coords from the DB and test it out

about 4 years ago · Juan Pablo Isaza Relatório
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