# How to select features in OpenStreetMap

I'm using OSM (online) with OpenLayers to show my map (I don't have a mapserver) but when I do this:

map = new OpenLayers.Map( 'map',  {numZoomLevels: 7, units:"km", minZoomLevel: "10" } );
map.zoomTo(3);


The map comes with too much information. I need to show only roads and countries. Any way to do this?

-

The OSM wiki lists some alternative tile servers which you could use instead of the default layer. Some more can be found in the list of OSM based services.

But remember: They are usually not suited for heavy traffic! If you expect many hits for your site then you should serve your own tiles instead.

-
I'm trying to avoid serving my own map, but I think there is no way to. The map is only a background to my game where two objects will live in (cities and mobile units). I will not interact with the map elements, so I have no map data in my database. By serving my own map, I will spend much more resources in the map instead the game itself (and open the door to much more troubles). –  Magno C Mar 31 '14 at 12:43
Then the only option is trying to find a different tile server with a stylesheet you like. –  scai Mar 31 '14 at 12:49
My new concern is in the traffic. You said They are usually not suited for heavy traffic and now I'm worried about this. –  Magno C Mar 31 '14 at 13:05
Yes, you should be. Because the official OSM servers run on donated resources, see the tile usage policy. If you found a public tile server with a style you want to use, then you should get into contact with the corresponding operator and ask if you can use it for your project. Otherwise you might get blocked sooner or later. –  scai Mar 31 '14 at 13:12
Well, thanks for your tips and advices. I will make my own server now. Will be hard, but necessary. –  Magno C Mar 31 '14 at 13:24

OpenLayers can only display the tiles that were pre-rendered and published on http://www.openstreetmap.org. If you want a more decent background, try the watercolors map by Stamen: http://maps.stamen.com/watercolor/#12/37.7706/-122.3782

If you want to see more ore less features at a certain zoom level, you have to render your own map. If you don't want to use mapserver, you can do it with QGIS server, Tilemill, Maperitive or Mapnik as well.

-
Stamen map is nice, but isn't what I looking for. I will accept your answer. Thanks. –  Magno C Mar 15 '14 at 18:32
Then consider creating your own style. –  scai Mar 17 '14 at 8:55

Actually when you getting OSM as base layer by calling service with the help of OpenLayers then layer comes from open street map server i.e. its a tile which is served through service,hence you can not change anything on that layer.What you can do is make your own shapefile of whatever you want like roads or countries with boundary store in geoserver or mapserver and served as service.Then you can avoid extra information.You can use openlayers api and serve the layer using geoserver or mapserver.This link may help you for starter http://openlayers.org/dev/examples/.

-
Thanks. Even reluctant I must do it. –  Magno C Mar 31 '14 at 13:34

Here you can find a thread on this topic, but the above answers are right. Since you get just tiles, there is no chance to mess around with features.

-