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

110
Views
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 answers
Answer question

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 Report
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!