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

116
Visualizações
Google Maps not loading routes with React + Flask

The problem

Hi all,

I'm new to both React and Flask so sorry if this is a simple problem, but basically, I have two inputs (starting/ending locations) that get passed to the Flask backend that goes through an algorithm and then exports the Google Map route as a .html; I can input the start/end locations and create the new route, it just doesn't update in real-time as I have to refresh the page to see the results.

In my App.js I have a simple iframe to embed the results as

<iframe id="Google-Map" src={"./map.html"} width="75%" height="500vh"></iframe>

How would I be able to allow it to refresh in real-time?

What I’ve tried

I've tried the following

import Map from './map.html';

function App(){
...
<iframe id="Google-Map" src={"./map.html"} width="75%" height="500vh"></iframe>
}

But I get the following error:

ERROR in ./src/map.html 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <html>
| <head>
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
 @ ./src/App.js 7:0-30
 @ ./src/index.js 6:0-24 10:33-36

webpack 5.65.0 compiled with 1 error and 1 warning in 66 ms
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Keep your html file in a public place, not under the src folder. Because somehow the files under the src folder are not visible.

You can edit your iframe line like this:

<iframe id="Google-Map" src="../map.html" width="75%" height="500vh"></iframe>
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