[OpenLayers-Users] sphericalMercator

Linda Rawson linda.rawson at gmail.com
Wed Dec 12 18:01:23 EST 2007


I use it all the time.


I just haven't gotten the overview map to work with it.

Here is my code:


    var options = {
                projection: "EPSG:900913",
                units: "m",
                maxResolution: 156543.0339,
    numZoomLevels: 18,
                maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
                                                 20037508, 20037508.34)
            };


    // avoid pink tiles
    OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
    OpenLayers.Util.onImageLoadErrorColor = "transparent";

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

    sat_wms = new OpenLayers.Layer.Google(
                "Layer",
                {'sphericalMercator': true}
    );

    map.addLayer(sat_wms);

    map.addControl(new OpenLayers.Control.MousePosition());
    map.addControl(new OpenLayers.Control.LayerSwitcher());
    map.addControl(new OpenLayers.Control.Scale());

    map.zoomToScale(55468034.09051751);


Linda


On Dec 12, 2007 3:49 PM, bradleyspencer <brad at cubewerx.com.au> wrote:

>  List,
>
>
>
> I am trying to test the GoogleMaps and sphericalMercator but I must have
> something wrong. Has anyone successfully used this stuff?
>
>
>
> See http://demo.cubewerx.com.au/mercator.html
>
>
>
> Cheers,
>
>
>
> *Brad Spencer***
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20071212/373302bc/attachment.html


More information about the Users mailing list