[OpenLayers-Users] Google EPSG:900913 and Italian EPSG:3003
Kiks
enrico.oemi at gmail.com
Mon Jul 5 06:52:49 EDT 2010
I'm making some progress.. but nothing appens
I downloaded proj4js and added these references:
<script src="OpenLayers-2.8/proj4js/lib/proj4js-compressed.js"></script>
<SCRIPT type="text/javascript"
src="OpenLayers-2.8/proj4js/lib/projCode/tmerc.js"></SCRIPT>
<SCRIPT type="text/javascript"
src="OpenLayers-2.8/proj4js/lib/projCode/merc.js"></SCRIPT>
<SCRIPT type="text/javascript"
src="OpenLayers-2.8/proj4js/lib/defs/EPSG3003.js"></SCRIPT>
<SCRIPT type="text/javascript"
src="OpenLayers-2.8/proj4js/lib/defs/EPSG900913.js"></SCRIPT>
I created the file the EPSG3003.js
Proj4js.defs["EPSG:3003"] = "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996+x_0=0
+y_0=0 +ellps=intl +a=6378388.0 +rf=297.0000000000601+units=m +no_defs";
but the google satellite map is not beeing reprojected...
Kiks wrote:
>
> Hello to all,
> I've got a layer in Epsg:3003 for the zone near Parma in Italy.
> Coords in epsg: 3003 (Gauss Boaga projection, fuso ovest) are about E
> 1545000 ; N 4935000
> I would like to overlay a google maps satellite layer that is in
> epsg:900913
>
> I tried this:
>
> ...
> var Gsat = new OpenLayers.Layer.Google("Google Satellite",
> { type: G_SATELLITE_MAP,
> 'sphericalMercator': true,
> projection: new OpenLayers.Projection("EPSG:900913"),
> displayProjection: new
> OpenLayers.Projection("EPSG:3003"),
> units: "m",
> numZoomLevels: 18,
> maxResolution: 156543.0339,
> maxExtent: new OpenLayers.Bounds(-20037508,
> -20037508,20037508, 20037508.34),
> isBaselayer: true,
> 'reproject': true
> });
>
> var Vect = new OpenLayers.Layer.WMS("Catasto e PTCP",
> "http://localhost/mapserverms4w/mapserv.exe",
> { map: 'CG.map',
> layers:
> 'ptcp_poly,ptcp_line,CG_GEO_PARTICELLE,CG_GEO_STRADE,CG_GEO_ACQUE,CG_GEO_FABBRICATI,CG_GEO_TESTI,CG_GEO_PARTICELLE_LABEL',
> format: 'aggpng24',
> //format: 'image/jpeg',
> transparent: 'off'
> },
> { maxExtent: new OpenLayers.Bounds(1530500, 4905500,
> 1575000, 4935000),
> scales: [500, 1000, 2000, 5000, 10000, 15000, 20000],
> units: 'm',
> projection: new OpenLayers.Projection("EPSG:3003"),
> displayProjection: new
> OpenLayers.Projection("EPSG:3003"),
> gutter: 0,
> ratio: 1,
> wrapDateLine: true,
> isBaselayer: false,
> singleTile: true,
> transitionEffect: 'resize'
>
> });
>
> ...
>
> the problem is that if I activate the google layer, coords seem to be
> wrong: instead of 1545000; 4920000 for a point in Gauss Boaga, google
> satellite show me the same point at coord 1070000; 5539000
>
> I can't understand where I'm wrong, because I'm quite sure that my
> mapserver layer is in EPSG:3003
>
> Thanks to everybody,
> Kiks
>
>
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Google-EPSG-900913-and-Italian-EPSG-3003-tp5248120p5255606.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list