Skip to content

Instantly share code, notes, and snippets.

@maptastik
Created December 2, 2016 16:44
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 maptastik/5b77e65b955fc3eefa9a236a2f7eb028 to your computer and use it in GitHub Desktop.
Save maptastik/5b77e65b955fc3eefa9a236a2f7eb028 to your computer and use it in GitHub Desktop.
jQuery Geo - Simple Map
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>jQuery Geo - Starter</title>
<style>
body {margin: 0;padding: 0;}
#map {
position: absolute;
top: 0; bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<!-- Draw the map here -->
<div id="map"></div>
<script src="http://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="http://code.jquerygeo.com/jquery.geo-1.0.0-rc1.min.js"></script>
<script>
$(function(){
// set up the map
var map = $("#map").geomap({
center: [-85.632935, 37.857507],
zoom: 7,
services: [{
id: "toner",
type: "tiled",
src:"http://a.basemaps.cartocdn.com/light_all/{{:zoom}}/{{:tile.column}}/{{:tile.row}}.png"
}]
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment