I'm trying to create a map using OpenLayers which uses a png image as a base layer but I'm having a bit of trouble. I'm not too familiar with OpenLayers as I have only come across it today and thought that it could prove to be a powerful tool.
So far I have just been using the code from the tutorial and changed the base layer from a WMS format to an Image format but it still does not show the map on the webpage.
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers Tutorial - Basic Map Setup</title>
<script src="http://openlayers.org/api/OpenLayers.js"></script>
<script type="text/javascript">
var map, baseLayer;
function init(){
map = new OpenLayers.Map('map');
baseLayer = new OpenLayers.Layer.Image("College Lane", "http://getontinternet.com/fyp/college-lane.png" );
map.addLayer(baseLayer);
map.setCenter(new OpenLayers.LonLat(0,0),1);
}
</script>
<style>
@media screen
{
#map{width: 1300px; height:1300px; border: 2px solid black;}
}
</style>
</head>
<body onload="init()">
<h3>OpenLayers Tutorial - Basic Map Setup</h3>
<div id="map"></div>
</body>
</html>
It's probably something really silly that needs changing but I've looked at documentation and I can't seem to find the issue.
Any help would be appreciated!