Skip to content

Instantly share code, notes, and snippets.

@t2psyto
Created May 26, 2014 02:56
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 t2psyto/c6c9192cdbcb5980fa8c to your computer and use it in GitHub Desktop.
Save t2psyto/c6c9192cdbcb5980fa8c to your computer and use it in GitHub Desktop.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.ie.css" />
<![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<script src="http://www.mapquestapi.com/sdk/leaflet/v1.0/mq-map.js?key=Fmjtd%7Cluur2d08lu%2Cra%3Do5-9a829f"></script>
<script type="text/javascript">
window.onload = function() {
var mapLayer = MQ.mapLayer(),
map;
map = L.map('map', {
layers: mapLayer,
center: [ 37.902418,139.023221 ],
zoom: 16
});
L.control.layers({
'Map': mapLayer,
'Satellite': MQ.satelliteLayer(),
'Hybrid': MQ.hybridLayer()
}).addTo(map);
// add a marker in the given location, attach some popup content to it and open the popup
L.marker([37.902418,139.023221]).addTo(map)
.bindPopup('新潟県庁 <br> ほげほげ.')
.openPopup();
}
</script>
</head>
<body>
<div id='map' style='width:800px; height:600px;'></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment