Skip to main content
Use WebGl Earth in your Flask application,
ability to add markers and polygons

##Reuires
- Jinja
- Flask

##Installation
'''pip install flask-webglearth'''

or

'''
git clone https://github.com/nikulesko/Flask-WebGLEarth
cd Flask-WebGLEarth
python setup.py install
```

##View
'''python
from flask import Flask, render_template
from flask_webglearth import WebGlEarth, WebGl, MAP_TYPES, Marker, Polygon

app = Flask(__name__, template_folder=".")
WebGl(app)


@app.route("/")
def index():
webgl_earth = WebGlEarth(zoom=1, map_type=MAP_TYPES.get('osm'),
center=[46.3, 30.4], atmosphere=True,
markers=[Marker(49.3, 30.4, "Hello world!")],
polygons=[Polygon(([45.1, 30.3],
[46.1, 40.56], [50.3, 20.8]))])
return render_template('example_template.html', webgl_map=webgl_earth)


if __name__ == "__main__":
app.run(debug=True)
'''

## Template
'''html
<!DOCTYPE html>
<html>
<head>
<title></title>
{{webgl_map.js}}
</head>
<body onload="initialize()">
<div id="earth_div" style="width:600px;height:400px;border:1px solid gray; padding:2px;">
</body>
</html>
'''

## Screenshot

<img src="screenshot.png" />

Release files for Flask-WebGlEarth 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Flask-WebGlEarth 0.1.3
File Size Uploaded
Flask-WebGlEarth-0.1.3.zip 203.3 kB Details

Release files / Flask-WebGlEarth-0.1.3.zip

Download URL Flask-WebGlEarth-0.1.3.zip
Size 203.3 kB
Tags Source
SHA-256 checksum
How to use checksums
600f880e9beb263fb9d4192299a7c3537dc661c48f001eb3c91ad6f116eb054b
BLAKE2b-256 checksum
How to use checksums
c0fc53b2fdbef59e4203b6dbdfa129c9330f652f974bf0db5962dffc8030843e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page