<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[OpenLayer] &quot;Bounds&quot; e &quot;maxExtent&quot;: di cosa di tratta?]]></title><description><![CDATA[<p dir="auto">Salve a tutti,<br />
sto lavorando ad un progetto ove è necessario utilizzare <a href="http://openlayers.org/two/" rel="nofollow ugc">OpenLayers 2</a> e <a href="http://mapserver.org/" rel="nofollow ugc">MapServer</a>.</p>
<p dir="auto">Nella creazione di una mappa sono necessari i seguenti parametri:</p>
<ul>
<li><a href="http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/BaseTypes/Bounds-js.html#OpenLayers.Bounds" rel="nofollow ugc">Bounds</a>;</li>
<li><a href="http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.minExtent" rel="nofollow ugc">maxExtent</a>.</li>
</ul>
<p dir="auto">Esattamente sapere dirmi di cosa si tratta?<br />
Come li ottengo?</p>
<p dir="auto">In un esempio recuperato sul web ho trovato la seguente funzione:</p>
<pre><code>var mapBounds = new OpenLayers.Bounds(14.9993397108, 37.5982084681, 15.0827501864, 37.6482928821);
var options = {
                projection: new OpenLayers.Projection("EPSG:900913"),
                displayProjection: new OpenLayers.Projection("EPSG:4326"),
                units: "m",
                zoom: 12,
                numZoomLevels: 21,
                maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34)
                };

map = new OpenLayers.Map('map', options);

......

map.zoomToExtent(mapBounds.transform(map.displayProjection, map.projection));
</code></pre>
<p dir="auto">Chi ha avuto la possibilità di utilizzarlo, potrebbe indicarmi il funzionamento?<br />
Grazie.</p>
]]></description><link>https://dev.connect.gt/topic/208684/openlayer-quot-bounds-quot-e-quot-maxextent-quot-di-cosa-di-tratta</link><generator>RSS for Node</generator><lastBuildDate>Sat, 28 Nov 2026 01:27:01 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/208684.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 02 Dec 2014 16:08:41 GMT</pubDate><ttl>60</ttl></channel></rss>