[OpenLayers-Users] plz help

Schuyler Erle sderle at metacarta.com
Mon Mar 26 17:21:02 EDT 2007


* On 26-Mar-2007 at  3:15AM EST, ben afia olfa said:
> Hi 
> i have a map to get it from a geoserver 
> function init(){
>             map = new OpenLayers.Map( $('map') );
>            
>             layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
>              "http://localhost:8080/geoserver/wms", {layers: 'topp:mymap'} );
>             map.addLayer(layer);
>            
>             map.addControl( new OpenLayers.Control.LayerSwitcher() );
>             map.zoomToExtent(new OpenLayers.Bounds(871444,244922,871576,245050));
>         }
>         
> 
> when i tried this there is no map in the web page

You are apparently using a coordinate system that is not Lon/Lat.
Please read this FAQ entry:

    http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#Projections

HTH!

SDE



More information about the Users mailing list