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 am trying to create a tilelayer.wms overlay on top of a wfs base map and I wasn't sure whether leaflet allows the applications/openlayers type of format which I served up from geoserver or only images/pngs.

share|improve this question
up vote 1 down vote accepted

With leaflet, you can add WMS services as tile layers on the map. There is some example code in leaflet api here.

var nexrad = L.tileLayer.wms("", {
    layers: 'nexrad-n0r-900913',
    format: 'image/png',
    transparent: true,
    attribution: "Weather data © 2012 IEM Nexrad"

i hope it helps you...

share|improve this answer
Yes, I know that, but I mean can the format where you have 'image/png' be 'applications/openlayers'? – Carl Carlson Nov 20 '12 at 20:19
No. WMS maps are dished out as images. Application/openlayers is not a valid format. see WMS specs – rashad Nov 20 '12 at 20:41
Application/openlayers can be a valid format but it isn't what you want - it returns a complete html page containing an OpenLayers application inside it. It's mostly a short hand for the GeoServer layer previews that turned out to be handy for others to use. – iant Nov 21 '12 at 8:35

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.