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

1 Answer 1

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("http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi", {
    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
1  
No. WMS maps are dished out as images. Application/openlayers is not a valid format. see WMS specs opengeospatial.org/standards/wms –  rashad Nov 20 '12 at 20:41
1  
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
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.