[OpenLayers-Users] WMS?
Kunzman, Doug
dkunzman at usgs.gov
Tue Jan 8 14:28:09 PST 2013
Hi -
I've looked at the available online documentation and was wondering if
anyone could offer some hints on what could be wrong?
I have been comparing it to the samples and don't see anything.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0,
maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>fish</title>
<link rel="stylesheet" href="../theme/default/style.css"
type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="events_test_files/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer, layer2;
function init(){
map = new OpenLayers.Map( 'map', {sphericalMercator : true,
projection : "EPSG:3857"} );
var basemap = new OpenLayers.Layer.XYZ(
"USGS Base Map",
"
http://basemap.nationalmap.gov/ArcGIS/rest/services/TNM_Vector_Fills_Small/MapServer/tile/${z}/${y}/${x}
",
{
numZoomLevels : 16,
projection : "EPSG:3857",
sphericalMercator : true,
group : "basemap",
meta : false,
wrapDateLine : true
});
map.addLayer(basemap);
layer2 = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers:
'basic'} );
map.addLayer(layer2);
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"
http://107.20.228.18/ArcGIS/services/FWS_Wetlands_WMS/mapserver/wmsserver?",
{layers: "18,17,16,15,14,13", 'transparent': 'off',
format: "png"},
{isBaseLayer: false, displayInLayerSwitcher: true});
map.addLayer(layer);
alert(layer.getExtent());
map.zoomToMaxExtent(layer.getExtent());
map.setCenter(new
OpenLayers.LonLat(lon=-77.44555646516,lat=39.500732399862));
map.addControl( new OpenLayers.Control.LayerSwitcher() );
}
</script>
</head>
<body onload="init()">
<h1 id="title">Basic Single WMS Example</h1>
<div id="tags">
basic, simple, minimal, cleanup
</div>
<div id="shortdesc">Show a Simple Map</div>
<div id="map" class="smallmap" style="border:1px solid
blue;width:512px;height:256px;"></></div>
<div id="docs">
<p>This example shows a very simple layout with minimal controls.
This example uses a single WMS base layer.</p>
</div>
</body>
</html>
thanks,
Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130108/379a4da6/attachment.html>
More information about the Users
mailing list