[OpenLayers-Users] Projection headache with WMS
Kunzman, Doug
dkunzman at usgs.gov
Fri Jan 4 11:27:38 PST 2013
Can someone help with small sample of Nighttime lights. When I set my map
to be projected with EPSG:3857 it no longer works.
Any help would be greatly appreciated.
Thanks, Doug
*<!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>Night Time Lights</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;*
* function init(){*
* //map = new OpenLayers.Map( 'map', /*{sphericalMercator :
true, projection : "EPSG:3857"} */);*
* map = new OpenLayers.Map( 'map', {sphericalMercator : true, projection
: "EPSG:3857"} );*
*
*
* layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",*
* "
http://imsref.cr.usgs.gov:80/wmsconnector/com.esri.wms.Esrimap/USGS_EDC_National_Atlas
",*
* {layers: "ATLAS_NIGHT_LIGHTS", sphericalMercator :
true, projection: "EPSG:102113", format: "image/png"} );*
* //aliasproj = new OpenLayers.Projection("EPSG:3857");*
* //layer.projection = aliasproj;*
* map.addLayer(layer);*
* map.zoomToMaxExtent();*
* map.setCenter(new
OpenLayers.LonLat(lon=-77.44555646516,lat=39.500732399862), 7); *
* }*
* </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>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130104/d3176e46/attachment-0001.html>
More information about the Users
mailing list