I've defined the following map:
Proj4js.defs["EPSG:31258"] = "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs";
var googleProj = new OpenLayers.Projection("EPSG:900913");
var salzburgProj = new OpenLayers.Projection("EPSG:31258");
var bounds = new OpenLayers.Bounds(426249,294999,426251,295001);
var maxZoom = 19;
var minZoom = 15;
var res = [4.77731426696777,2.38865713348389,1.194328566741945,0.5971642833709725];
mapCOD = new OpenLayers.Map({
div: "mapCODs",
allOverlays: true,
maxExtent: bounds,
projection: googleProj,
allowSelection: true,
controls: [new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.Navigation()]
});
var layer = new OpenLayers.Layer.OSM(
"layer1",
"tiles/input/${z}/${x}/${y}.png",
{zoomLevels: maxZoom, zoomOffset: minZoom, resolutions: res}
);
mapCOD.addLayer(layer);
I have created map tiles by myself using mapnik. The map is visualized properly, but I have a shift problem when I try to add a vector layer as follows:
// feat = ...well formed GeoJson feature
var geojson_format = new OpenLayers.Format.GeoJSON({internalProjection: googleProj, externalProjection: salzburgProj});
var vector_layer = new OpenLayers.Layer.Vector(1);
vector_layer.addFeatures(geojson_format.parseFeature(feat));
map.addLayer(vector_layer);

You can see the result in the image above: the vector layer (purple geometries) should be up-right shifted, in order to match the tiles below them. I do not understand why I obtain this behaviour: what is missing in my code?
