<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<br>> "Peru WMS",<br><font style="font-size:10pt" color="#1F497D" face="Arial" size="2"><br><font style="font-size: 10pt;" size="2"><font style="font-size: 10pt;" size="2">cool =)</font></font><br>__________________________________________________________________________________________<br>Piensa en el medio ambie<font style="" face="Arial">nte - mantenlo en la pantalla. NO lo imprimas si NO es necesario.</font></font><font style="font-size:10pt" color="#1F497D" face="Arial" size="2"><br></font><font style="font-size:10pt" color="#1F497D" face="Arial" size="2">Think green - keep it on the screen. Do NOT print if it is NOT necessary.</font><font style="font-size:10pt" color="#1F497D" face="Arial" size="2"><br></font><font style="font-size:10pt" color="#1F497D" face="Arial" size="2"><span id="ecxresult_box" class="ecxshort_text" lang="de"><span class="ecxhps">Denken Sie an</span> <span class="ecxhps">die Umwelt</span></span></font><font style="font-size:10pt" color="#1F497D" face="Arial" size="2"><span id="ecxresult_box" lang="de"><span class="ecxhps"></span> <span class="ecxhps">-</span> <span class="ecxhps">bewahren Sie es</span> <span class="ecxhps">auf dem Bildschirm.</span> <span class="ecxhps">Drucken Sie NICHT</span><span>, wenn</span> <span class="ecxhps">es NICHT notwendig ist</span><span>.</span></span></font><br><br><br><div><div id="SkyDrivePlaceholder"></div>> Date: Wed, 9 Jan 2013 17:57:53 -0500<br>> From: woodbri@swoodbridge.com<br>> To: openlayers-users@lists.osgeo.org<br>> Subject: Re: [OpenLayers-Users] OpenLayers with 900913 projection and drupal OpenLayers module<br>> <br>> On 1/9/2013 5:49 PM, Alexander Kocisky wrote:<br>> > Hi all,<br>> ><br>> > I've set up a Geoserver/PostGIS infrastructure in order to render a<br>> > database of GIS information. Initially i was working with the projection<br>> > 4326 but when i've installed Drupal + OpenLayers i've realized that<br>> > there are almost no tiles with this projection, the way to go seems the<br>> > projection 900913.<br>> ><br>> > So i've converted all my gis objects to 900913, verified that i could<br>> > see the rendered points in the geoserver Layer Preview with OpenLayer<br>> > and tried to add the WMS layer to my map created with Drupal Openlayer<br>> > module.<br>> ><br>> > It apparently works but it fetches a bound box that is wrong, in fact if<br>> > i modify manually the request urls (from the browser) i get the correct<br>> > data. I need to understand better how this bounded box works, how is it<br>> > initially set? i guess that for each png image downloaded there is a<br>> > specific BBOX parameter, is this done by the Openlayers library?<br>> ><br>> > I've also explained the issue on the drupal openlayers module but<br>> > apparently it was never really tested with WMS 900931 (weird right?) .<br>> > The module works well with the same configuration and the 4326<br>> > projection (http://drupal.org/node/1884422).<br>> ><br>> > Please let me know if you have any suggestion.<br>> > Thanks!!<br>> ><br>> > Alex<br>> <br>> Alex,<br>> <br>> I think you need to post how the OL map and layer objects are defined or <br>> post a link to your site if it is public.<br>> <br>> More than likely you have left off something like: SphericalMercator: true<br>> <br>> <br>> Here is what I use:<br>> <br>> map = new OpenLayers.Map('map', {<br>> maxResolution: 156543.0339/2,<br>> numZoomLevels: 18,<br>> units: 'm',<br>> maxExtent: new OpenLayers.Bounds(-20037508.34, <br>> -20037508.34, 20037508.34, 20037508.34),<br>> sphericalMercator: true,<br>> projection: epsg900913,<br>> displayProjection: epsg4326,<br>> controls:[<br>> new OpenLayers.Control.LayerSwitcher(),<br>> // new OpenLayers.Control.OverviewMap(),<br>> new OpenLayers.Control.Permalink('permalink'),<br>> new OpenLayers.Control.MouseToolbar(),<br>> new OpenLayers.Control.MousePosition(),<br>> new OpenLayers.Control.PanZoomBar(),<br>> new OpenLayers.Control.Scale(),<br>> new OpenLayers.Control.ScaleLine()<br>> ]<br>> });<br>> <br>> var wms = new OpenLayers.Layer.WMS(<br>> "Peru WMS",<br>> "http://server/cgi-bin/mapserv?",<br>> { map: "/u/data/mydata/peru4.map",<br>> format: "image/png",<br>> layers: "Peru4_4326_WMS"<br>> },<br>> {<br>> sphericalMercator: true,<br>> transitionEffect: 'resize',<br>> singleTile: true,<br>> ratio: 1.0<br>> });<br>> wms.addOptions({isBaseLayer: true});<br>> wms.setVisibility(false);<br>> map.addLayer(wms);<br>> <br>> -Steve<br>> _______________________________________________<br>> Users mailing list<br>> Users@lists.osgeo.org<br>> http://lists.osgeo.org/mailman/listinfo/openlayers-users<br></div> </div></body>
</html>