[OpenLayers-Users] Projection headache with WMS
Erdal Karaca
erdal.karaca.de at gmail.com
Fri Jan 4 12:34:31 PST 2013
Doesn't OL need proj4js to work with other projections?
2013/1/4 Kunzman, Doug <dkunzman at usgs.gov>
> 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>*
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130104/7d56c7f9/attachment.html>
More information about the Users
mailing list