[OpenLayers-Users] Best constructor for OSM

Christopher Schmidt crschmidt at metacarta.com
Wed Oct 7 07:41:44 EDT 2009


On Tue, Oct 06, 2009 at 01:34:32PM -0400, Yves Moisan wrote:
> Hi All,
> 
> I have an overlay problem with an OSM layer.  I'm using a TMS style OSM
> base layer and it seems impossible to restrict the extent.  When zooming
> to maxextent, it won't bother a restricted extent map directive.  I
> tried displayOutsideMaxExtent = false and it does not change anything.
> 
> Looking around for a way to solve that, I see many ways to integrate an
> OSM layer in OpenLayers :
> 
> OpenLayers.Layer.WMS( "OSM" ...
> 
> OpenLayers.Layer.OSM( ...
> 
> OpenLayers.Layer.OSM.*  ...
> 	with * = Mapnik, Osmarender, CycleMap et. al.
> 
> OpenLayers.Layer.TMS with a custom JS function (osm_getTileURL in all
> examples I've seen).
> 
> The question is : what is the current best practice in terms of
> including an OSM Mapnik layer ?

Regardless of what it is, no code currently in OpenLayers behaves differently
than what you are currently seeing.

However, see http://trac.openlayers.org/ticket/2155 -- which could probably
be a Map level option to always change zoomTOMaxExtent to use the restricted
Extent, if one exists.

-- CHris



> TIA,
> 
> Yves
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list