Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

113
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda