I've set up Geoserver and WMS capabilities to host some weather data files (satellite data for example). Here's an example file:


see code below for ip

Now, I'd like to be able to use leaflet to display weather data layers. I've been successful in getting example in Leaflet documentation to work: http://leafletjs.com/reference.html#tilelayer-wms

But when I try to do this same thing for the data on my Geoserver, the layer never shows up. Here's the snippet from my Leaflet code:

var test = L.tileLayer.wms("",{
layers: 'opengeo:met9Qtest',
format: 'image/png',
transparent: true,    
opacity: 0.7       

I've tried changing the SRS in geoserver to EPSG:900913, 4326, 102100, 3857... still nothing. Any ideas? I can't tell if the issue I am having is on the Leaflet side or Geoserver?

Thanks, Matt

  • have you added the layer to the map? map.addLayer(test); – Kelso Jan 23 '13 at 23:27
  • Yes, I have the layer being added. And I'm sure the code works because the NEXRAD example plots the layer just fine. I'm thinking it's something in my geoserver configuration. Thanks for the reply! – Matt Jan 23 '13 at 23:40
  • Solved! In Geoserver for the WMS layer, I had to make "declared SRS" = EPSG:63266405 (which is EPSG:WGS 84 deg) for Leaflet to properly display this layer. Two day set back... moving on! – Matt Jan 23 '13 at 23:55
  • 1
    EPSG:63266405 looks very wrong to me - isn't there some way to tell Leaflet to use 4326 (which is what the rest of us use)? – Ian Turton Jan 24 '13 at 9:04

Browse other questions tagged or ask your own question.