Hello,

maybe this a very newbie request, but I cannot find myself the solution!

I have a GML file projected in gcs-wgs84. I created a Openlayers
project and used both the Openlayers and Demis WMS as base layers,
everything is fine. With Google (I'm trying to use the Hybrid map),
there problem due to the different projections I suppose. So I checked
the live example "OpenLayers Spherical Mercator Example" on
http://openlayers.org/dev/examples/, and tried to implement some of
the code there in my project, but I wasn't able to make it works....

Which lines of code should I use? I tried adding the just the
following to my project:

Initially
            var options = {
                projection: new OpenLayers.Projection("EPSG:900913"),
                displayProjection: new OpenLayers.Projection("EPSG:4326"),
                units: "m",
                numZoomLevels: 18,
                maxResolution: 156543.0339,
                maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
                                                 20037508,
20037508.34) -ok, I know I can change this but i don't think it's the
problem now....
            };


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

and
            var ghyb = new OpenLayers.Layer.Google(
                "Google Hybrid",
                {type: G_HYBRID_MAP, 'sphericalMercator': true}
            );

but the result is "Invalid projectio [epsg:900913], only"

Just a clarification: I have NO experience on programming language, I
can just copy and paste lines of code, change some parameters, and
check the syntax.... ;-)
Thanks to everyone!!





--
Simone Bianchi
www.simonebianchi.eu
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to