Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] All the described ways of showing a map in this repo don't work #153

Open
ghost opened this issue May 2, 2022 · 5 comments
Open

Comments

@ghost
Copy link

ghost commented May 2, 2022

Describe the bug
A clear and concise description of what the bug is.

All the described ways of showing a map in this repo don't work.

To Reproduce
Steps to reproduce the behavior:

  1. Having the following folder structure
# /path/
# ...../folder/...
├── README.md
├── __pycache__
│   └── app.cpython-310.pyc
├── app.py
├── static
└── templates
    └── example.html
  1. Having the following config files:
Config files

/path/.env

Your .env content here

and

/path/settings.toml

[default]
  1. Having the following app code:
  from flask import Flask, render_template
  from flask_googlemaps import GoogleMaps, Map
  
  app = Flask(__name__, template_folder=".")
  GoogleMaps(app)
  
  
  @app.route("/")
  def mapview():
      # creating a map in the view
      mymap = Map(
          identifier="view-side",
          lat=37.4419,
          lng=-122.1419,
          markers=[(37.4419, -122.1419)],
      )
      sndmap = Map(
          identifier="sndmap",
          lat=37.4419,
          lng=-122.1419,
          markers=[
              {
                  'icon': 'http://maps.google.com/mapfiles/ms/icons/green-dot.png',
                  'lat': 37.4419,
                  'lng': -122.1419,
                  'infobox': "<b>Hello World</b>",
              },
              {
                  'icon': 'http://maps.google.com/mapfiles/ms/icons/blue-dot.png',
                  'lat': 37.4300,
                  'lng': -122.1400,
                  'infobox': "<b>Hello World from other place</b>",
              },
          ],
      )
      return render_template('/templates/example.html', mymap=mymap, sndmap=sndmap)
  
  
  if __name__ == "__main__":
      app.run(debug=True)

  1. Executing under the following environment

flask run, pycharm run, ...

Expected behavior
A clear and concise description of what you expected to happen.

Debug output

 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with watchdog (fsevents)
 * Debugger is active!
 * Debugger PIN: 119-826-731
127.0.0.1 - - [02/May/2022 23:59:41] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [02/May/2022 23:59:43] "GET / HTTP/1.1" 200 

Environment (please complete the following information):

  • OS: macOS Monterey 12.3.1

Additional context

example.html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
{{googlemap("sndmap", lat=0.23234234, lng=-0.234234234, markers=[(0.12, -0.45345)])}}
</body>
</html>

s

@ghost ghost added the bug label May 2, 2022
@veselin-angelov
Copy link

What version of the package are you running? Take a look at #145. Probably the same issue.

@Irtiza90
Copy link

Irtiza90 commented Jun 7, 2022

Downloading the latest version from this repository works

pip install flask-googlemaps directly won't work because the released version has not been uploaded to pypi
✔ instead you can do pip install git+https://github.com/flask-extensions/Flask-GoogleMaps

@getcake getcake pinned this issue Dec 1, 2022
@getcake getcake unpinned this issue Dec 1, 2022
@KashaMalaga
Copy link

Awesome, Feb 2023 and Pypi packet abandoned and the code isnt working from here 🗡️

@S-Naved
Copy link

S-Naved commented May 5, 2023

Downloaded the lastest version from git :
pip install git+https://github.com/flask-extensions/Flask-GoogleMaps

still Not working.

@dmtzs
Copy link

dmtzs commented Nov 6, 2023

Is this library dead? is going to be better to fork this repo and mantain this from another owner?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants