Skip to content

Instantly share code, notes, and snippets.

@alexyoung
Created April 1, 2009 09:51
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 alexyoung/88628 to your computer and use it in GitHub Desktop.
Save alexyoung/88628 to your computer and use it in GitHub Desktop.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Example</title>
<link rel="stylesheet" href="theme/default/style.css" type="text/css" />
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function init() {
map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS('OpenLayers WMS', 'http://labs.metacarta.com/wms/vmap0?', {layers: 'basic'});
map.addLayers([ol_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(1, 50), 5);
}
</script>
</head>
<body onload="init()">
<h1 id="title">Quite Useful Map Example</h1>
<p>Basic map usage example.</p>
<div id="map" class="smallmap"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment