Код: Выделить всё
<html>
<head>
<script src="OpenLayers.js"> </script>
<script type="text/javascript">
function init(){
map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.XYZ("OpenLayers",
["http://localhost/${z}/${x}/${y}.png"],
{transparent: 'true', isBaseLayer: true,sphericalMercator:true});
map.addLayer(wms);
map.zoomToMaxExtent();
/* var proj = new OpenLayers.Projection("EPGS:4326");
var point = new OpenLayers.LonLat(30,60);
map.setCenter(point.transform(proj,map.getProjectionObject()),4);*/
}
</script>
</head>
<body onload="init()">
<div style="width:100%; height:100%" id="map"></div>
</body>
</html>