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've set up Geoserver and WMS capabilities to host some weather data files (satellite data for example). Here's an example file:

http://xxx.xxx.xxx.xxx:8080/geoserver/opengeo/wms?service=WMS&version=1.1.0&request=GetMap&layers=opengeo:met9Qtest&styles=&bbox=-39.550275759,-33.426229830999986,60.91911924099999,67.043165169&width=512&height=512&srs=EPSG:900913&format=image/png

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("http://209.123.242.190:8080/geoserver/opengeo/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

share|improve this question
    
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
    
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)? –  iant Jan 24 '13 at 9:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.