Actually I need only the full functionality of the map but with no tiles and no requests to the server for them. Can I somehow skip them on the initial load? Is there any default parameter I can set? If not I'll make the patch myself but I'm not sure it's not done yet.
A:
The code I pasted here gives you the openlayers interface with a dummy layer that cannot be loaded. Although I do not see why you would want this, this does show up an empty OpenLayers mapwindow.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Standalone</title>
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
function init(){
map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "dummy",
"",
{layers: 'basic'} );
map.addLayer(layer);
//map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
<h1 id="title">Basic Single WMS Example</h1>
<div id="map" style="width:250px;height:250px"></div>
<div id="docs">
</div>
</body>
</html>
milovanderlinden
2009-07-23 16:34:23
You can copy the code into an empty test.html doc and even run it straight from a desktop. When you zoom and pan, you will see the pink empty tiles appear.
milovanderlinden
2009-07-23 16:35:31
Yes, but the problem is that this produces 404 responses and I don't need those. Can I somehow make the exact same thing but with no 404s?
stoimen
2009-07-24 10:28:54
stoimen, please be more specific. Why do you want an openlayers without any map layers at all?
milovanderlinden
2009-07-24 12:30:56
A:
Just use vector layers.
http://openlayers.org/dev/examples/snapping.html
Do you actually even have to give the map a layer? I haven't tried doing that.
Conley Owens
2010-04-05 17:02:11