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.

My base map was created using hard-coded template variables. I am using the leaflet tilelayer.wms constructor and including the url like so:

url: "http://localhost:8080/geoserver/sf/wmsservice=WMS&version=1.1.0&request=GetMap&layers=sf:archsites&styles=&bbox=589851.4376666048,4914490.882968263,608346.4603107043,4926501.8980334345&width=512&height=332&srs=EPSG:26713",

so I'm grabbing a wms layer from geoserver and I'm trying to make it display in my leaflet base map, but I don't think I have to actually go about creating a feature group. I think the url could possibly be simply:

http://localhost:8080/geoserver/sf/wmsservice=WMS

but then that would mean I need to structure the layer property which I am also unsure how to do so correctly. I think essentially I want to satisfy the GetCapability, GetMap, and GetFeatureInfo requests using leaflet's API. And I think this is possible to do by utilizing only the layer group methods and the tilelayer methods. In addition I don't want to have to utilize onclick to retrieve the GetFeatureInfo because essentially I am adding in data programmatically.

I've seen examples utilizing the onClick eventlistener to do this, but I'd like it to be a toggle under the layer controls for visibility as it still is an overlay. So essentially I'd like to have a controls based listener as opposed to onclick.

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

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.