[OpenLayers-Users] Google Overviewmap

JuKiM rifins at gmail.com
Fri Feb 5 05:12:20 EST 2010


Hi,

I create an overview map with a gmaps layer, but it doesn't center on the
ovmap.. It puts the center of the base layer in the top left of the ovmap
instead of putting it in the center of the ov map...

I create the map and ov like this:


var Google_SAT = new OpenLayers.Layer.Google("GMap Sat",
        { type: G_SATELLITE_MAP, numZoomLevels: 20, "sphericalMercator":
true }, { isBaseLayer: true });

var ovMAP = new OpenLayers.Layer.Google("GMap Streets",
        { }, { isBaseLayer: false });

var bounds = new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34,
20037508.34);

    options = {
        projection: new OpenLayers.Projection("EPSG:900913"),
        displayProjection: new OpenLayers.Projection("EPSG:4326"),
        units: "m",
        maxResolution: 156543.0339,
        maxExtent: bounds
    };

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

var optionsOV = {
    projection: new OpenLayers.Projection("EPSG:4326"),
    units: "m",
        maxResolution: 156543.0339,
        maxExtent: bounds,
        layers: [ovMAP]
    };

    var overview = new OpenLayers.Control.OverviewMap(optionsOV);
    map.addControl(overview);

Does any body can help?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100205/93c5fd1a/attachment.html


More information about the Users mailing list