skip to navigation
skip to content

Flask-WebGlEarth 0.1.3

Simple extension for Flask to use WebGl Earth

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

- Jinja
- Flask

'''pip install flask-webglearth'''


git clone
cd Flask-WebGLEarth
python install

from flask import Flask, render_template
from flask_webglearth import WebGlEarth, WebGl, MAP_TYPES, Marker, Polygon

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

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__":

## Template

<body onload="initialize()">
<div id="earth_div" style="width:600px;height:400px;border:1px solid gray; padding:2px;">

## Screenshot

<img src="screenshot.png"/>  
File Type Py Version Uploaded on Size (md5) Source 2014-01-07 198KB