Created
February 28, 2013 23:14
-
-
Save jfirebaugh/5060992 to your computer and use it in GitHub Desktop.
Leaflet/mapbox opacity test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="stylesheet" href="dist/leaflet.css" /> | |
| <!--[if lte IE 8]> | |
| <link rel="stylesheet" href="dist/leaflet.ie.css" /> | |
| <![endif]--> | |
| <script src="dist/leaflet.js"></script> | |
| <style> | |
| #map { | |
| width: 100%; | |
| height: 100%; | |
| position: absolute; | |
| top: 0px; | |
| left: 0px; | |
| right: 0px; | |
| bottom: 0px; | |
| } | |
| </style> | |
| <div id="map"></div> | |
| <script> | |
| var map = L.map('map') | |
| .setView([43.6654, -79.4775], 15); | |
| var base = L.tileLayer('http://{s}.tile.mapbox.com/v3/examples.map-vyofok3q/{z}/{x}/{y}.png') | |
| .addTo(map); | |
| var overlay = L.tileLayer('http://{s}.tile.mapbox.com/v3/aibram.Aerial/{z}/{x}/{y}.png') | |
| .addTo(map); | |
| overlay.setOpacity(0.6); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment