Hawaii and Alaska Overlays

Showing the full united states with inset maps

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Hawaii and Alaska Overlays</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.mapbox.com/mapbox.js/v3.0.1/mapbox.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v3.0.1/mapbox.css' rel='stylesheet' />
<style>
  body { margin:0; padding:0; }
  #map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<div id='map'></div>
<div id='map-overlay-hawaii'></div>
<div id='map-overlay-alaska'></div>

<style>
  body { margin:0; padding:0; }
  #map { position:absolute; top:0; bottom:0; width:100%; }
  #map-overlay-hawaii {
      position:absolute;
      left:10px;
      bottom:10px;
      width:200px;
      height:150px;
      border:1px solid #fff;
  }
  #map-overlay-alaska {
      position:absolute;
      left:10px;
      bottom:175px;
      width:200px;
      height:150px;
      border:1px solid #fff;
  }
</style>
<script>
L.mapbox.accessToken = '<your access token here>';
var mapid = 'mapbox.streets';
var overlayOptions = {
    zoomControl: false,
    attributionControl: false
};

var map = L.mapbox.map('map', mapid)
    .fitBounds([[22.917922936146045,-127.265625],[50.28933925329178,-64.3359375]]);

var mapOverlayHawaii = L.mapbox.map('map-overlay-hawaii', mapid, overlayOptions)
    .fitBounds([[18.542116654448996,-161.03759765625],[22.573438264572406,-154.22607421875]]);

var mapOverlayAlaska = L.mapbox.map('map-overlay-alaska', mapid, overlayOptions)
    .fitBounds([[51.72702815704774,-170.15625],[71.85622888185527,-127.61718749999999]]);
</script>
to create your own custom map and use it in this example.
Use this example by copying its source into your own HTML page and replacing the Map ID with one of your own from your projects. Having trouble with JavaScript? Try out Codecademy or contact our support team.
Copy example