Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Simple extension for Flask to use WebGl Earth

Project Description
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 History

Release History

This version
History Node

0.1.3

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Flask-WebGlEarth-0.1.3.zip (203.3 kB) Copy SHA256 Checksum SHA256 Source Jan 7, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting