[OpenLayers-Users] OverviewMap with google layer possible?

Jimmy Aumard jimmy.aumard at gmail.com
Thu Dec 10 05:37:47 EST 2009


Hi,

I try to put an overviewmap with google layer but when my map is under
"france" the overviewmap is under the turkey :(

This is my map:

var bounds = new OpenLayers.Bounds(-2.003750834E7, -2.003750834E7,
2.003750834E7, 2.003750834E7);
    var options = {
        projection: new OpenLayers.Projection("EPSG:900913"),
        displayProjection: new OpenLayers.Projection("EPSG:4326"),
        units: "m",
        maxResolution: 156543.03390625,
        numZoomLevels: 19,
        maxExtent: bounds,
        controls: [/*new OpenLayers.Control.KeyboardDefaults()*/]
    };
    map = new OpenLayers.Map($('olmap'), options);

And this is my overviewmap:
var gphyMini = new OpenLayers.Layer.Google("Google Hybrid mini", {
            type: G_HYBRID_MAP,
            sphericalMercator: true
        });
 var controlOptions = {
            mapOptions:  {
                projection: new OpenLayers.Projection("EPSG:900913"),

                units: "m",
                maxResolution: 156543.03390625,
                maxExtent: new OpenLayers.Bounds(-2.003750834E7,
-2.003750834E7, 2.003750834E7, 2.003750834E7)
            },
           layers: [gphyMini]
        }


    var overview1 = new OpenLayers.Control.OverviewMap(controlOptions);
     map.addControl(overview1);

If anyone have ideas to resolve the problem that great !
Thanks!


-- 
Aumard Jimmy
Développeur - http://www.kinaxia.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091210/c914a6ed/attachment.html


More information about the Users mailing list