[OpenLayers-Users] sphericalMercator

bradleyspencer brad at cubewerx.com.au
Wed Dec 12 18:17:26 EST 2007


Oops, my problem. I had a classic syntax problem.

Cheers,

Brad Spencer


-----Original Message-----
From: Linda Rawson [mailto:linda.rawson at gmail.com]
Sent: Thursday, 13 December 2007 10:01 AM
To: brad at cubewerx.com.au
Cc: openlayers users
Subject: Re: [OpenLayers-Users] sphericalMercator

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
<mailto: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 <mailto: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/20071213/1305f83d/attachment.html


More information about the Users mailing list