3

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.

2 Answers 2

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.

0

I think the problem you have mentioned stems 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;

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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