<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <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>