Skip to content

Instantly share code, notes, and snippets.

@jfirebaugh
Forked from tmcw/index.html
Last active December 16, 2015 16:19

Revisions

  1. jfirebaugh revised this gist Apr 25, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,7 @@
    .setView([41.8925, 12.4830], 16);

    map.remove();
    document.getElementById('map').innerHTML = '';

    var map2 = L.mapbox.map('map', 'examples.map-y7l23tes')
    .setView([41.8925, 12.4830], 16);
  2. @tmcw tmcw created this gist Apr 25, 2013.
    26 changes: 26 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    <!DOCTYPE html>
    <html>
    <head>
    <script src='http://api.tiles.mapbox.com/mapbox.js/v1.0.1/mapbox.js'></script>
    <link href='http://api.tiles.mapbox.com/mapbox.js/v1.0.1/mapbox.css' rel='stylesheet' />
    <!--[if lte IE 8]>
    <link href='http://api.tiles.mapbox.com/mapbox.js/v1.0.1/mapbox.ie.css' rel='stylesheet' >
    <![endif]-->
    <style>
    body { margin:0; padding:0; }
    #map { position:absolute; top:0; bottom:0; width:100%; }
    </style>
    </head>
    <body>
    <div id='map'></div>
    <script type='text/javascript'>
    var map = L.mapbox.map('map', 'examples.map-y7l23tes')
    .setView([41.8925, 12.4830], 16);

    map.remove();

    var map2 = L.mapbox.map('map', 'examples.map-y7l23tes')
    .setView([41.8925, 12.4830], 16);
    </script>
    </body>
    </html>