[OpenLayers-Users] Avoiding world repeat with a Google map layer

Lance Dyas lancelot at inetnebr.com
Thu Apr 10 20:02:31 EDT 2008


Christopher Schmidt wrote:
> On Thu, Apr 10, 2008 at 11:25:51AM +0100, Guillaume wrote:
>  
>> Hello,
>>
>> I am trying to display a map, with a Google map base layer. A 
>> requirement is to see the whole world, but only once: even at the 
>> lowest zoom level, the world must not be repeated.
>>     
>
> This is a problem with using the Google Maps API. I'm not aware of a way
> to change this in the Google Maps API, but that would be the place to
> look.
>
> Regards,
>   

There is a method...

GMercatorProjection.prototype.tileCheckRange = 
function(tile,zoom,tilesize) {

    var maxTile = Math.floor(this.getWrapWidth(zoom) / tilesize);

    if (tile.x < 0 || tile.x >= maxTile || tile.y < 0 || tile.y >= 
maxTile) {

        return false;

    }

    return true

}


AV



More information about the Users mailing list