Skip to content

Instantly share code, notes, and snippets.

@saik0
Created April 3, 2013 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saik0/5298044 to your computer and use it in GitHub Desktop.
Save saik0/5298044 to your computer and use it in GitHub Desktop.
leaflet test
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" />
<![endif]-->
<script type="text/javascript" src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script>
<script type="text/javascript" src="leafletembed.js"></script>
</head>
<body onload="initmap();">
<div id="map" class="map" style="height:100%;"></div>
</body>
</html>
var map;
var ajaxRequest;
var plotlist;
var plotlayers=[];
function initmap() {
// set up the map
map = new L.Map('map', {
crs: L.CRS.EPSG4326
});
// create the tile layer
var minmusUrl='http://home.saik0.net/kspmaps/minmus/tiles/{z}/{x}/{y}.png';
var minmusAttrib='Map data &copy; Joel Pedraza';
var minmus = new L.TileLayer(minmusUrl, {
minZoom: 3,
maxZoom: 3,
attribution: minmusAttrib,
tilesize: 225,
});
map.setView(new L.LatLng(0, 0),3);
map.addLayer(minmus);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment