Hello everybody,
Im absolutely new to OpenLayers For a start I wanted to check out the possibilities of OpenLayers and display a geoJSON-Layer which should act as the base layer. The layer uses the projection ESPSG 31468 / DHDN / Gauss-Krüger 4. To say it in plain words Im not too successfull in this, as nothing is displayed. I tried the following code which I copied from various sources: <html> <head> <script src="Lib/OpenLayers.js"></script> <script type="text/javascript"> var map; function init(){ var lon = 4596651.93; var lat = 5355977.11; map = new OpenLayers.Map('map', { projection: "EPSG:31468" }); var kmlLayer = new OpenLayers.Layer.Vector("GeoJSON", { isBaseLayer: true, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "flurstuecke.json", format: new OpenLayers.Format.GeoJSON() }) }); map.addLayers([kmlLayer]); map.addControl(new OpenLayers.Control.MousePosition()); map.setCenter(new OpenLayers.LonLat(lon, lat), 10); } </script> </head> <body onload="init()"> <div id="map" style="width:300px; height:300px; border: 1px solid black;"></div> </body> </html> Can anybody tell me whats wrong with it? By the way, how is it possible to retrive the extends of a geoJSON file? Thank you all and regards --- KnowHow - Helmut Seidel M.A. Softwareentwicklung & Coaching Gabelsbergerstraße 17 B 84034 Landshut Telefon: 0871 9665230 Internet: www.knowhow-la.de
_______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users