3

I have been trying this since yesterday. If I load only the tilestache layer, it is visible. If I load both bing and tilestache layer, the tilestache layer is not visible. When I look at the firebug console, the tiles are being loaded.

_map = new OpenLayers.Map({div: 'map'});
bing = new OpenLayers.Layer.Bing({
    key: 'AqR9gcXm14-PKVQsWrL8H9A_RnusHZCzQKX_tbJegzU1EOZGafcjzCYbcpkwukQh',
    type: 'Aerial'
});

tilestache = new OpenLayers.Layer.XYZ(
        'hul',
        'http://www.hyderabadurbanlab.com/tiles/tiles.py/hul2/${z}/${x}/${y}.png',
        {
          tileSize: new OpenLayers.Size(256, 256),
          tileOrigin: get_point(17.4099, 78.4761),
          sphericalMercator: true,
          isBaseLayer: false,
          transparent: true,
          opacity: 0.6,
          transitionEffect: 'resizing',
          buffer: 1,
          wrapDateLine: true
        }
    );
_map.addLayers([bing, tilestache]);

Attached is the screen shot of how it looks.Bing and Tilestache

When I load just the tilestache layer, it looks like this:Just tilestache

I want the Bing maps as the base layer and the tilestache layer on top of it as an overlay.

Thank you.

2

When I set a value of 1 to the zoomOffset, the tilestache layer is visible.

Bing maps zoom levels start with 0. Looks like the tiles layer (like google) starts with 1. By giving a proper offset, tiles of the required zoom level are being requested and shown.

| improve this answer | |
0

i think the problem you have mentioned that stem from projection settings. check out your map and layers projections.

var geographic = new OpenLayers.Projection("EPSG:4326");
var mercator = new OpenLayers.Projection("EPSG:900913");

or test it with sphericalMercator = false;

i hope it helps you...

| improve this answer | |
  • 1
    Map is EPSG:4326. Bing and tilestache are EPSG:900913. I have change map projection to EPSG:900913, nothing changed. I have tested with sphericalMercator = false; that too didn't work. I have tried EPSG:4326 for map, bing and tilestache; with that even bing maps didn't show up. – Srisa Nov 29 '12 at 5:13
  • Did you ever figure this out @Srisa? I'm having the same problem – Gabriel Fair Nov 20 '17 at 14:36
  • 1
    @GabrielFair I have answered the question and accepted my answer. That worked for me. Hope it works for you too. – Srisa Jan 4 '18 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.