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

When do you decide which to use? I've started using Geoserver and it seems like map files are downloaded to the browser (using Leaflet) in the WFS format.

When I look at OSM, Mapbox etc, they use what I believe is the slippy map format: /zoom/x/y.png 256x256 tiles.

Should Geoserver be configured to use slippy map format? And will using WMS prevent slippy map interactions like Google maps and Leaflet?

What are your recommendations if I'm using Geoserver and Leaflet and want to serve some map tiles.

share|improve this question

I think what you want to do is make a slippy map, right?

This is very easy with Leaflet and GeoServer, so long as you only want to view information.

In GeoServer, style a layer, and test it. Then, with Leaflet, add the layer from GeoServer via WMS. Example is included below, replace all the with your values:

<link rel="stylesheet" href="" />
<!--[if lte IE 8]>
 <link rel="stylesheet" href="" />

<script src=""></script>

<div id="map"  style="width: 800px; height: 600px"></div>

    var center = new L.LatLng(<LAT>,<LON>);
    var map = new L.Map('map', { center: center, zoom: 14, attributionControl:true, zoomControl:false});   
    var gi = new L.TileLayer.WMS("http://<SERVER>:8080/geoserver/gwc/service/wms", {
        layers: '<WORKSPACE>:<LAYER NAME>',
        format: 'image/png',
        maxZoom: 20

If you actually want vectors, consider carefully why. You can achieve it using tileJSON, but it isn't simple. You can query the WMS layer, though, and highlight individual features, which is quite nice!

share|improve this answer

I don't think leaflet supports WFS till now. OSM uses tile server where the actual images are stored as tiles and served to clients, whereas in geoserver the actual data is vector and images are made on client request and served. I don't know much about leaflet but openlayers supports both tiled and untiled WMS.

there is no need to configure geoserver for slippy map. just use leaflets TileLayer.WMS.

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.