Skip to content

Instantly share code, notes, and snippets.

@mapsense-examples
Last active August 29, 2015 14:15
Show Gist options
  • Save mapsense-examples/bbeb63d06c8ed9f0ee77 to your computer and use it in GitHub Desktop.
Save mapsense-examples/bbeb63d06c8ed9f0ee77 to your computer and use it in GitHub Desktop.
Raster if you have to
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://d3js.org/topojson.v1.min.js" charset="utf-8"></script>
<script src="https://developer.mapsense.co/mapsense.js" charset="utf-8"></script>
<link type="text/css" href="https://developer.mapsense.co/mapsense.css" rel="stylesheet"/>
<style>
html, body, #myMap{
height: 100%;
width: 100%;
margin: 0; padding: 0;
}
</style>
</head>
<body>
<div id="myMap"></div>
<script>
var map = mapsense.map("#myMap") //tell it where to go
.center({lon: -122.4, lat: 37.8})
.zoom(5);
//create and add the image layer
map.add(mapsense.image()
.url(mapsense.url("http://{S}.mqcdn.com/tiles/1.0.0/sat/{Z}/{X}/{Y}.jpg") // Credit http://developer.mapquest.com/web/products/open/map
.hosts(["otile1", "otile2", "otile3", "otile4"])));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment