Hi all,<br>I ought to display a map with osm layer as base and a gml file of a little part of Armenia.<br>First step was convert my shapefile, with projection epsg:2498, in a gml format (ogr2ogr -f GML ...).<br><br>Second step was set up my map.<br>
Within tag &lt;head&gt; of my html page, I&#39; ve insert a link to these libraries:<br><br>- OpenLayers-2.8/OpenLayers.js<br>- <a href="http://www.openstreetmap.org/openlayers/OpenStreetMap.js">http://www.openstreetmap.org/openlayers/OpenStreetMap.js</a><br>
- proj4js.js<br>- proj4s/lib/defs/EPSG2498.js<br><br>And this is a snippet of my map code [1].<br><br>The problem is that my gml is in the north of Africa instead of Armenia.<br>I&#39;ve tried with qgis and the layer is correctly positioned, so I suppose that the problem is in the code, but I&#39; m not able to detect the bug!!!<br>
<br>thanks<br><br>-beppe -<br><br>[1] function init() {<br>    var epsg2498= new OpenLayers.Projection(&quot;EPSG:2498&quot;);<br>    var epsg900913= new OpenLayers.Projection(&quot;EPSG:900913&quot;);<br>    var epsg4326= new OpenLayers.Projection(&quot;EPSG:4326&quot;);<br>
    <br>   var bounds = new OpenLayers.Bounds(44.532, 40.144, 45.038, 40.423).transform(epsg4326, epsg900913);<br><br>   map = new OpenLayers.Map (&quot;map&quot;, {<br>       controls:[<br>           new OpenLayers.Control.Navigation(),<br>
           new OpenLayers.Control.LayerSwitcher({activeColor:&quot;#729aa1&quot;}),<br>           new OpenLayers.Control.MousePosition({div:document.getElementById(&quot;coord&quot;)}),<br>           new OpenLayers.Control.Attribution()],<br>
           <br>       maxExtent: bounds,<br>       maxResolution: 156543.0399,<br>       numZoomLevels: 5,<br>       minZoomLevel: 3, <br>       maxZoomLevel: 8,<br>       units: &#39;m&#39;,<br>       projection: epsg900913,<br>
       displayProjection: epsg2498<br>   } );            <br>            <br>          <br>   var layerCycleMap = new OpenLayers.Layer.OSM.CycleMap(&quot;CycleMap&quot;);<br>    map.addLayer(layerCycleMap);<br>   <br>   var layerTilesAtHome = new OpenLayers.Layer.OSM.Osmarender(&quot;Osmarender&quot;);<br>
   map.addLayer(layerTilesAtHome);<br>   <br>   var layerMapnik = new OpenLayers.Layer.OSM.Mapnik(&quot;Mapnik&quot;);<br>   map.addLayer(layerMapnik);<br><br>    var isoline = new OpenLayers.Layer.Vector(&quot;isoline&quot;, {<br>
           strategies: [new OpenLayers.Strategy.Fixed()],<br>           protocol: new OpenLayers.Protocol.HTTP({<br>               url: &quot;../aramus_data/vector/gml/isoipse_2498.gml&quot;,<br>               projection: epsg2498,<br>
               format: new OpenLayers.Format.GML()<br>           })<br>       });<br>   isoline = OpenLayers.Projection.transform(isoline, epsg2498, map.projection);<br>    map.addLayer(isoline);<br clear="all">....<br>....<br>
....<br>-- <br>-beppe-<br>