from flask import Flask, jsonify
import os

import utils

app = Flask('ShowMeYourBigSatellite', static_url_path='/static')

@app.route('/get_coordinates')
def get_coordinates():
    (longitude, latitude) = utils.random_coordinates()
    print utils.random_coordinates()
    print longitude, latitude
    return jsonify(longitude=longitude,
                   latitude=latitude)

@app.route('/images/<path:path>')
def static_proxy_images(path):
    # send_static_file will guess the correct MIME type
    return app.send_static_file(os.path.join('images', path))

@app.route('/js/<path:path>')
def static_proxy_js(path):
    # send_static_file will guess the correct MIME type
    return app.send_static_file(os.path.join('js', path))

@app.route('/')
def root():
    return app.send_static_file('simplemap.html')

if __name__ == "__main__":
    app.run(debug=True)
@@ -26,16 +26,56 @@
 jsonify%0A
+from flask.ext.cors import cross_origin%0A
 import o
@@ -188,16 +188,89 @@
 nates')%0A
+@cross_origin(headers=%5B'Content-Type'%5D) # allow all origins all methods.%0A
 def get_

Add Flask-Cors for Json on crossed domain