{ "metadata": { "name": "", "signature": "sha256:66b28a33ea105105cc4e35233bb791d55b50e944f3337895b3b6849f7c3fa5df" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "https://developers.google.com/maps/ specifically [Google Maps JavaScript API v3 \u2014 Google Developers](https://developers.google.com/maps/documentation/javascript/)\n", "\n", "Go to [Getting Started - Google Maps JavaScript API v3 \u2014 Google Developers](https://developers.google.com/maps/documentation/javascript/tutorial)\n", "\n", "How to read in from a local file -- use script?" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from IPython.core.display import HTML, Javascript" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "# load the Google Maps API library\n", "# TO DO: make it easy to add API key\n", "\n", "def gmap_init():\n", " js = \"\"\"\n", "window.gmap_initialize = function() {};\n", "$.getScript('https://maps.googleapis.com/maps/api/js?v=3&sensor=false&callback=gmap_initialize');\n", "\"\"\"\n", " return Javascript(data=js)\n", "\n", "gmap_init()" ], "language": "python", "metadata": {}, "outputs": [ { "javascript": [ "\n", "window.gmap_initialize = function() {};\n", "$.getScript('https://maps.googleapis.com/maps/api/js?v=3&sensor=false&callback=gmap_initialize');\n" ], "metadata": {}, "output_type": "pyout", "prompt_number": 2, "text": [ "" ] } ], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "%%html\n", "