[OpenLayers-Users] Changing maxExtent on a TMS layer

Christopher Schmidt crschmidt at metacarta.com
Mon Oct 22 11:10:35 EDT 2007


On Mon, Oct 22, 2007 at 10:01:48AM -0500, Bellenger, Jim wrote:
> Hello, 
> 
> I am trying to add a TMS layer to an existing Google Maps layer but I
> can't find a way to set the maxExtent of the TMS layer.  If I don't add
> the Google Maps layer it uses the map extents which I have set to be the
> extents of the TMS layer so they are okay.

I'm somewhat lost. 

1. Are you trying to lay TMS tiles over Google Maps?
2. Are your TMS tiles in the Spherical Mercator projection? What did
   you use to generate them?
3. Do you have the sphericalMercator option set to true on your 
   Google layer?

http://trac.openlayers.org/wiki/UsingCustomTiles

Might be helpful.

http://openlayers.org/dev/examples/spherical-mercator.html

Might be as well.

If you are trying to overlay TMS tiles which only cover a small part of
the world on top of Google Maps, this does not yet work. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list