[OpenLayers-Users] Best constructor for OSM

Yves Moisan yves.moisan at boreal-is.com
Tue Oct 6 13:34:32 EDT 2009


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 ?

TIA,

Yves






More information about the Users mailing list