On Wednesday, April 25, 2012, alexe100 wrote: > I > I have a web page that shows points features and one line in the map > If I use: > var layer = new OpenLayers.Layer.WMS( "OpenLayers > WMS","http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} ); > map.addLayer(layer); > > the vectors are well shown.
I guess your vectors are in EPSG:4326. The OSGeo WMS layer is also in EPSG:4326, so the vectors display correctly onto this layer. > > IF I use this instead: > var layer = new OpenLayers.Layer.OSM(); > map.addLayer(layer); > > only one point feature is shown on the map and the text font has bad > quality. The OSM layer's projection is EPSG:900913 (Spherical Mercator)... Try adding projection:"EPSG:4326" in your vector layer options, to tell OpenLayers to transform the vector coords from EPSG:4326 to the map projection, that is EPSG:900913. This will only work if you use a BBOX or Fixed strategy in your vector layer. If not please show how you create the vector layer and add features to it. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
