Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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"));
map.zoomTo(3);

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

share|improve this question
add comment

4 Answers 4

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 at 12:43
1  
Then the only option is trying to find a different tile server with a stylesheet you like. –  scai Mar 31 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 at 13:05
1  
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 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 at 13:24
show 4 more comments

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.

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 at 18:32
    
Then consider creating your own style. –  scai Mar 17 at 8:55
add comment

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/.

share|improve this answer
    
Thanks. Even reluctant I must do it. –  Magno C Mar 31 at 13:34
add comment

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
add comment

Your Answer

 
discard

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.