Thanks for suggestion but doesn't works yet!!!<br>I found a solution using qgis plugin "ogr2layer", maybe the problem was in the parameters used in transformation code:<br><br># isoline =
OpenLayers.Projection.transform(isoline, epsg2498, map.projection);<br><br>new code is:<br><br># map.addLayer(new OpenLayers.Layer.GML("isoipse_2498 GML","../aramus_data/vector/reproj/isoipse_2498.gml"));<br>
<br># var extent = new OpenLayers.Bounds(4970294.552162,4901870.266154,4971024.689123,4902439.542244).transform(new #OpenLayers.Projection("EPSG:2498"), new OpenLayers.Projection("EPSG:900913"));<br><br>
and now works!!!<br><br>Anyway, I would like understand how to write correctly a gml layer!<br><br>Another question for you:<br>the second step is to be able to modify the gml, is it possible with strategy save?<br><br>-beppe-<br>
<br><div class="gmail_quote">2010/4/7 Arnd Wippermann <span dir="ltr"><<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font face="Arial" size="2" color="#0000ff">Perhaps you do two times a transformation. I would
think, that in your Vector layer the transformation takes place, so the second
part isn't needed.</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" size="2" color="#0000ff"></font></span> </div>
<div dir="ltr" align="left"><div class="im"> var isoline = new
OpenLayers.Layer.Vector("isoline",
{<br> strategies:
[new
OpenLayers.Strategy.Fixed()],<br>
protocol: new
OpenLayers.Protocol.HTTP({<br>
url: "../aramus_data/vector/gml/isoipse_2498.gml",<br></div><span><font face="Arial" size="2" color="#0000ff">//1.</font></span></div>
<div dir="ltr" align="left"><div class="im">
projection:
epsg2498,<br>
format: new
OpenLayers.Format.GML()<br>
})<br> });<br></div><span><font face="Arial" size="2" color="#0000ff">//2.</font></span></div><div class="im">
<div dir="ltr" align="left"> isoline =
OpenLayers.Projection.transform(isoline, epsg2498, map.projection);</div><br>
</div><div dir="ltr" lang="de" align="left"><span><font face="Arial" size="2" color="#0000ff">Arnd </font></span></div>
<div dir="ltr" lang="de" align="left"><span> </span></div>
<div dir="ltr" lang="de" align="left">
<hr>
</div>
<div dir="ltr" lang="de" align="left"><font face="Tahoma" size="2"><b>Von:</b> <a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a>
[mailto:<a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a>] <b>Im Auftrag von </b>Giuseppe
Naponiello<br><b>Gesendet:</b> Mittwoch, 7. April 2010 12:02<br><b>An:</b>
<a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><br><b>Betreff:</b> [OpenLayers-Users] Just another
trasformation problem ;)<br></font><br></div><div><div></div><div class="h5">
<div></div>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 <head> of my html page, I' ve insert a
link to these libraries:<br><br>- OpenLayers-2.8/OpenLayers.js<br>- <a href="http://www.openstreetmap.org/openlayers/OpenStreetMap.js" target="_blank">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've tried with qgis and the layer is correctly
positioned, so I suppose that the problem is in the code, but I' m not able to
detect the bug!!!<br><br>thanks<br><br>-beppe -<br><br>[1] function init()
{<br> var epsg2498= new
OpenLayers.Projection("EPSG:2498");<br> var epsg900913= new
OpenLayers.Projection("EPSG:900913");<br> var epsg4326= new
OpenLayers.Projection("EPSG:4326");<br> <br> var
bounds = new OpenLayers.Bounds(44.532, 40.144, 45.038,
40.423).transform(epsg4326, epsg900913);<br><br> map = new
OpenLayers.Map ("map", {<br>
controls:[<br> new
OpenLayers.Control.Navigation(),<br>
new
OpenLayers.Control.LayerSwitcher({activeColor:"#729aa1"}),<br>
new
OpenLayers.Control.MousePosition({div:document.getElementById("coord")}),<br>
new
OpenLayers.Control.Attribution()],<br>
<br> maxExtent:
bounds,<br> maxResolution:
156543.0399,<br> numZoomLevels:
5,<br> minZoomLevel: 3,
<br> maxZoomLevel:
8,<br> units:
'm',<br> projection:
epsg900913,<br> displayProjection:
epsg2498<br> }
);
<br>
<br> <br> var
layerCycleMap = new
OpenLayers.Layer.OSM.CycleMap("CycleMap");<br>
map.addLayer(layerCycleMap);<br> <br> var
layerTilesAtHome = new
OpenLayers.Layer.OSM.Osmarender("Osmarender");<br>
map.addLayer(layerTilesAtHome);<br> <br> var layerMapnik
= new OpenLayers.Layer.OSM.Mapnik("Mapnik");<br>
map.addLayer(layerMapnik);<br><br> var isoline = new
OpenLayers.Layer.Vector("isoline",
{<br> strategies:
[new
OpenLayers.Strategy.Fixed()],<br>
protocol: new
OpenLayers.Protocol.HTTP({<br>
url:
"../aramus_data/vector/gml/isoipse_2498.gml",<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></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>-beppe-<br>