[OpenLayers-Users] Own map layer in different projection
dalori
shoppen at bananenhand.de
Thu Jun 28 01:48:57 PDT 2012
Well yes, I guess this is the thing I mentioned with being stupid.
I have added the bounds, but I don't know if there is a name for the
projection. It is just a rectangular projection with no adjustments covering
the whole world.
The example init function would now look like this, but this still does not
work:
function init()
{
point = new OpenLayers.LonLat(-131.662903, 54.167258);
bounds = new OpenLayers.Bounds();
bounds.extend(new OpenLayers.LonLat(-180, -90));
bounds.extend(new OpenLayers.LonLat(180, 90));
map = new OpenLayers.Map("map", {
tileSize : new OpenLayers.Size(512, 512),
maxExtent: bounds
});
map.addLayer(new OpenLayers.Layer.TMS("Name",
"http://www.bananenhand.de/background/level", {
'type' : 'jpg',
'getURL' : get_my_url,
isBaseLayer: true
}));
map.setCenter(point, 2);
markers = new OpenLayers.Layer.Markers("Markers");
map.addLayer(markers);
markers.addMarker(new OpenLayers.Marker(point));
}
@Olivier Terral: Thanks for the lon/lat issue. I was too used to Google
which does it the wrong way with y/x. ;-)
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Own-map-layer-in-different-projection-tp4984150p4984486.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list