Hi, You can use a vector layer as baselayer.
You cannt display a GML file of 57MB with 47000 features as a vector layer in any internet explorer. An internet explorer is not a desktop application. Perhaps 500-1000 features are possible without break the performance of internet explorer. You have to choose an other approach to show your data in an web application. If your data is in GML, then in your layer declaration you have to use new OpenLayers.Format.GML() instead of new OpenLayers.Format.OSM(). Arnd -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von BillHinge Gesendet: Sonntag, 12. September 2010 16:47 An: [email protected] Betreff: [OpenLayers-Users] Is it possible to render GML vector layer only? Hi I'm doing some R&D. I have a large 57mb GML file that I have been given to play with. I have tried opening it in 2 java based clients and I can see coloured vector based maps. The viewers tell me there are 6 layers in the file and approx 47000 features. In future I would expect to have a smaller file eg factor of 400 smaller by area My question is two fold, is it possible to view this file via Openlayers with no raster layer? Secondly, I've played around with the simple examples and feel OK with them but for some reason I'm having trouble with this one I'm using a proxy on my local machine and also on my internet domain set as per openlayers website such that if I load the url of the proxy it takes me to the openlayers site. I'm currently testing using Safari, Firefox, Opera (I'm on mac using dashcode) In order to load the page I'm currently trying OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; var map = new OpenLayers.Map('map'); var gmlLayer = new OpenLayers.Layer.Vector( "TopographicPoint",reportError=true,isBaseLayer=true, { strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "http://steveorobec.com/feeds/Shetland.gml", format: new OpenLayers.Format.OSM() }), style: {strokeColor: "green", strokeWidth: 5, strokeOpacity: 0.5}}); map.addLayers(gmlLayer); However, I'm not getting any output or error in my browser debuggers (other than missing css stylesheet) TopographicPoint is one of the layers in the gml file by the way Any ideas? Once I'm pointing in the right direction I should be OK, I'm probably doing something stupid or missing something thanks Steve -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Is-it-possible-to-render-GML-vector-l ayer-only-tp5523534p5523534.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
