flask-extensions / Flask-GoogleMaps

Easy way to add GoogleMaps to Flask applications. maintainer: @getcake
https://flask-googlemaps.com
MIT License
644 stars 195 forks source link

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

Open ghost opened 2 years ago

ghost commented 2 years ago

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** ```bash Your .env content here ``` and **/path/settings.toml** ```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):

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

veselin-angelov commented 2 years ago

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

Irtiza90 commented 2 years ago

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

KashaMalaga commented 1 year ago

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

S-Naved commented 1 year ago

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

still Not working.

dmtzs commented 10 months ago

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