<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=046401320-07042010><FONT face=Arial
color=#0000ff size=2>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 class=046401320-07042010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left> 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><SPAN
class=046401320-07042010><FONT face=Arial color=#0000ff
size=2>//1.</FONT></SPAN></DIV>
<DIV dir=ltr
align=left>
projection:
epsg2498,<BR>
format: new
OpenLayers.Format.GML()<BR>
})<BR> });<BR><SPAN
class=046401320-07042010><FONT face=Arial color=#0000ff
size=2>//2.</FONT></SPAN></DIV>
<DIV dir=ltr align=left> isoline =
OpenLayers.Projection.transform(isoline, epsg2498, map.projection);</DIV><BR>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left><SPAN
class=046401320-07042010><FONT face=Arial color=#0000ff
size=2>Arnd </FONT></SPAN></DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left><SPAN
class=046401320-07042010> </SPAN></DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left><FONT face=Tahoma
size=2><B>Von:</B> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <B>Im Auftrag von </B>Giuseppe
Naponiello<BR><B>Gesendet:</B> Mittwoch, 7. April 2010 12:02<BR><B>An:</B>
users@openlayers.org<BR><B>Betreff:</B> [OpenLayers-Users] Just another
trasformation problem ;)<BR></FONT><BR></DIV>
<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">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></BODY></HTML>