<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23562"></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=062430321-11032014>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=062430321-11032014></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=062430321-11032014>set the resolutions for the osm layer, then it should
work:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=062430321-11032014></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial>
var osm = new OpenLayers.Layer.OSM("Open Street Map",
"",{<BR>
resolutions: [2445.984, 1222.99, 611.496, 305.748, 152.874, 76.437,
38.218],<BR>
serverResolutions :
[156543.03390625,78271.516953125,39135.7584765625,19567.87923828125,9783.939619140625,4891.9698095703125,<BR>
2445.9849047851562,1222.9924523925781,611.4962261962891,305.74811309814453,152.87405654907226,76.43702827453613,<BR>
38.218514137268066,19.109257068634033,9.554628534317017,4.777314267158508,2.388657133579254,1.194328566789627,<BR>
0.5971642833948135<BR>
]<BR> });<BR></FONT></DIV>
<DIV dir=ltr align=left><SPAN class=062430321-11032014><FONT color=#0000ff
size=2 face=Arial>Arnd</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=062430321-11032014><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=062430321-11032014><FONT color=#0000ff
size=2 face=Arial><A
href="http://gis.ibbeck.de/ginfo/apps/OLExamples/OLdev/OSM_restrictedZoomLevels.asp">http://gis.ibbeck.de/ginfo/apps/OLExamples/OLdev/OSM_restrictedZoomLevels.asp</A></FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> openlayers-users-bounces@lists.osgeo.org
[mailto:openlayers-users-bounces@lists.osgeo.org] <B>Im Auftrag von </B>Jim
White<BR><B>Gesendet:</B> Dienstag, 11. März 2014 00:05<BR><B>An:</B>
jack@greenbaum.org; openlayers-users@lists.osgeo.org<BR><B>Betreff:</B>
[OpenLayers-Users] OSM base layer with TMS overlay<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=moz-cite-prefix> Hi,<BR><BR>Here is what I have. You can see 4
base layers, and start of overlays at end. Any of the 3 base layers Google, TMS,
WMS selected will cause overlay TMS to be displayed properly. Selecting OSM base
layer selects tiles with wrong zoom.<BR><BR>With OSM as base layer it is
incorrectly selecting tile such as this with zoom 10, which is 6 too
large<BR><BR><A class=moz-txt-link-freetext
href="http://tecumseh.zo.ncsu.edu/tilecache/1.0.0/huc10nc/10/11/7.png">http://tecumseh.zo.ncsu.edu/tilecache/1.0.0/huc10nc/10/11/7.png</A><BR><BR>It
should be asking for <BR><BR><A class=moz-txt-link-freetext
href="http://tecumseh.zo.ncsu.edu/tilecache/1.0.0/huc10nc/4/11/7.png">http://tecumseh.zo.ncsu.edu/tilecache/1.0.0/huc10nc/4/11/7.png</A><BR><BR><BR><BR>
//////Base Layers<BR> var gphy = new
OpenLayers.Layer.Google("Google Physical",
{<BR> type:
google.maps.MapTypeId.TERRAIN,<BR>
MAX_ZOOM_LEVEL: 12,<BR>
MIN_ZOOM_LEVEL: 6,<BR>
displayInLayerSwitcher: false,<BR>
visibility: false,<BR> buffer:
0<BR> });<BR><BR> var osm = new
OpenLayers.Layer.OSM("Open Street Map");<BR><BR> var
counties_base = new
OpenLayers.Layer.TMS("None",<BR>
SERVER_URI + "tilecache/",
{<BR>
layername:
"counties",<BR>
type:
"png",<BR>
tileOrigin: new OpenLayers.LonLat(-9462455,
3963396)<BR> }<BR>
);<BR><BR> var hillshade = new OpenLayers.Layer.WMS("NC
Hillshade",<BR> SERVER_URI +
"geoserver/wms",
{<BR> layers:
"NC_Hill_3857_to",<BR>
format: 'image/png'<BR> },
{<BR>
visibility:
false,<BR>
displayInLayerSwitcher: false<BR>
});<BR>
////////////////////////////////////////////////////////////<BR>
/// TMS line layers overlays<BR>
/////////////////////////////////////////////////////////<BR><BR><BR>
var nchuc2 = new OpenLayers.Layer.TMS("NC HUC
2",<BR> SERVER_URI + "tilecache/",
{<BR>
layername:
"huc2nc",<BR>
type:
"png",<BR>
isBaseLayer:
false,<BR>
visibility:
false,<BR>
tileOrigin: new OpenLayers.LonLat(-9462455,
3963396)<BR> }<BR>
);On 03/10/2014 03:32 PM, <A class=moz-txt-link-abbreviated
href="mailto:jack@greenbaum.org">jack@greenbaum.org</A> wrote:<BR></DIV>
<BLOCKQUOTE
cite=mid:b1dcfe5b54f020b4197f349b12fd601b.squirrel@tides.mohawkreef.com
type="cite"><PRE wrap="">How are you creating the TMS layer? Are you using an OSM layer with the
TMS urls? If so that is you problem, TMS and OSM use opposite y dimension
mappings. Use a TMS layer instead.
-- Jack
</PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">Someone pointed out that I could request tiles from tilecache using TMS
instead of WMS, which I have done and it has mostly fixed my problems.
However, if I use Open Street Map as my base layer then my TMS overlays
are requesting the wrong tiles.
If I don't get any suggestions from the list I am going to file a bug.
Jim
On 03/10/2014 03:00 PM, <A class=moz-txt-link-abbreviated href="mailto:openlayers-users-request@lists.osgeo.org">openlayers-users-request@lists.osgeo.org</A> wrote:
</PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">Is the baselayer you are trying to serve from WMS in 900913? Serving
from tilecache is only going to work if the tiles are in right project.
Try losing the tileorigin in the constructor as well.
</PRE></BLOCKQUOTE><PRE wrap="">
--
James B. White
Cary, NC
H: 919-380-9615
M: 919-698-1765
White Coding and Maps <A class=moz-txt-link-rfc2396E href="http://whitecodingandmaps.com/"><http://whitecodingandmaps.com/></A>
_______________________________________________
Users mailing list
<A class=moz-txt-link-abbreviated href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</A>
<A class=moz-txt-link-freetext href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</A>
</PRE></BLOCKQUOTE><PRE wrap="">
</PRE></BLOCKQUOTE><BR><BR>
<DIV class=moz-signature>-- <BR>James B. White<BR>Cary, NC<BR>H:
919-380-9615<BR>M: 919-698-1765<BR><A
href="http://whitecodingandmaps.com/">White Coding and Maps</A>
</DIV></BODY></HTML>