Hello to the list.

With coordinates near south pole I have some problemsw with drawing a
map section. When the follwing code is executed no map is displayed.
First I thought the section is only the ice on the continent but I
checked this on found out that there must be a coast line.

Where is the bug in the code? I don't see it. For other map sections I
works.

Many thanks for your tips and hints.

J. D.

code:
function init(){
var map;
var point;
var lonLat;
var sphericalMercator = new OpenLayers.Projection('EPSG:900913');
var epsg4326 = new OpenLayers.Projection('EPSG:4326');
var leftBottom = new
OpenLayers.LonLat(166.516667,-89.983333).transform(epsg4326,
sphericalMercator);
var rightTop = new
OpenLayers.LonLat(179.983333,-77.850000).transform(epsg4326,
sphericalMercator);
var bounds = new OpenLayers.Bounds(leftBottom.lon, leftBottom.lat,
rightTop.lon, rightTop.lat);
        
var layer = new OpenLayers.Layer.OSM.Mapnik('Standardkarte');
map = new OpenLayers.Map('map', {
        maxExtent: bounds, restrictedExtent: bounds, projection: 
sphericalMercator,
        displayProjection: epsg4326,
        controls: [
                new OpenLayers.Control.Navigation(),
                new OpenLayers.Control.PanZoomBar(),
                new OpenLayers.Control.OverviewMap(),
                new OpenLayers.Control.LayerSwitcher({'ascending':false})
        ]
});
map.addLayer(layer);

lonLat = new OpenLayers.LonLat((leftBottom.lon +
rightTop.lon)/2,(leftBottom.lat + rightTop.lat) / 2)
        .transform(epsg4326, map.getProjectionObject());
map.setCenter(lonLat);
map.zoomToMaxExtent();
map.addControl(new OpenLayers.Control.LayerSwitcher());
}
-- 
Meine stets unfertige Homepage: www.dankoweit.de
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to