This is a demo of using OpenLayers.Layer.WMS to fetch from a non-WMS source, specifically, OpenStreetMap. However, it seems that there's something wrong with the source data here, since there's a definite disconnect at tile boundaries.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@833 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||||
|
<style type="text/css">
|
||||||
|
#map {
|
||||||
|
width: 800px;
|
||||||
|
height: 475px;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script src="../lib/OpenLayers.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
<!--
|
||||||
|
var zoom = 5;
|
||||||
|
var map, layer;
|
||||||
|
|
||||||
|
function init(){
|
||||||
|
map = new OpenLayers.Map( $('map') );
|
||||||
|
layer = new OpenLayers.Layer.WMS( "OpenStreetMap WMS",
|
||||||
|
"http://tile.openstreetmap.org/ruby/wmsmod.rbx?" );
|
||||||
|
layer.setTileSize(new OpenLayers.Size(256,128));
|
||||||
|
map.addLayer(layer);
|
||||||
|
|
||||||
|
map.setCenter(new OpenLayers.LonLat(-0.02197265625,51.492919921875), 13);
|
||||||
|
map.addControl( new OpenLayers.Control.LayerSwitcher() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// -->
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="init()">
|
||||||
|
<div id="map"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user