Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.addLayer(new OpenLayers.Layer.OSM("Main Map"));

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

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
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 If you want a more decent background, try the watercolors map by Stamen:

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.

share|improve this answer
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

share|improve this answer
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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.