[OpenLayers-Users] Overlay on Google

Andreas Hocevar ahocevar at opengeo.org
Mon Jun 22 09:50:47 EDT 2009


2009/6/22 toni hernández <tonidelacalle at gmail.com>:
> You should configure ArcGIS to serve 900913. I do not even know if that is
> possible. I guess it is.

If you cannot configure it to server 900913, look for EPSG:3785. That
is the official EPSG code for Spherical Mercator, but at the time that
OpenLayers Spherical Mercator support was written, the official code
was not available yet.

> OpenLayers can't reproject itself.

And Google only provides GMap in EPSG:900913. So you either have to
make ArcGIS serve your layer in 900913, or use a different basemap
than Google that supports 102113 (which seems to be a custom
projection).

Regards,
Andreas.

>
> On Mon, Jun 22, 2009 at 2:26 PM, moony <k_karo at web.de> wrote:
>>
>> Hi all,
>>
>> I want to use Google Maps as baselayer and overlay wms, which are
>> delivered
>> by ArcGIS Server.
>> OpenLayers is always using "epsg:900913", but ArcGIS Servers uses "epsg:
>> 102113" for the google projection.
>> How can I force OpenLayers to use "epsg: 102113" instead of "epsg:
>> 900913"?
>> Defining the projection in the options doesn't work.
>>
>> var options = {
>>                projection: new OpenLayers.Projection("EPSG:102113"),
>>                //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)
>>            };
>>           map = new OpenLayers.Map('map', options);
>>
>>             var gphy = new OpenLayers.Layer.Google(
>>                "Google Physical",
>>                {type: G_HYBRID_MAP, 'sphericalMercator': true}
>>            );
>>
>> var wms = new OpenLayers.Layer.WMS( "Fläche natürlicher Vegetation pro
>> Einwohner",
>>
>>
>> "http://xen1ags:8399/arcgis/services/Monitor/Bevoelkerung_Web/MapServer/WMSServer?",
>>                        {layers: '0', srs: 'EPSG:102113',format:
>> 'image/png', transparent:
>> 'true'},
>>                        {singleTile: true, isBaseLayer: false}
>>                        );
>>
>> map.addLayers([gphy,wms]);
>> --
>> View this message in context:
>> http://n2.nabble.com/Overlay-on-Google-tp2973539p3135908.html
>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list