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 add a wms tile layer overlay over a wfs tile layer which I added to a map object. When I tried to simply add a layer on top of my current setView for my map object it overwrote the first layer's and all the GUI I added was gone. How do I add a wms tile layer overlay?

share|improve this question
How did you add the new layer? Please post your code. – Devdatta Tengshe Nov 21 '12 at 3:05
I cannot accommodate all the code as it is multiple model/view files associated with a wfs base layer added to a map object. I thought that I could simply use the addLayer method on that map object. – Carl Carlson Nov 21 '12 at 14:09
Are you sure the problem is not in the way you have created the multiple model/views? To debug just try making a simple map on one html page with two WMS tiled services and see if it works. – Devdatta Tengshe Nov 21 '12 at 14:32
up vote 0 down vote accepted

Have a look at the example on this page:

It is definitely possible to add more than one tiled layer, like they have done. They are using L.TileLayer in this example, but you can use multiple L.TileLayer.WMS instead.

share|improve this answer
right I know that is possible, I've tried it. I'm just wondering if I add a wms layer to a map with a base map wfs layer I need to create another view file as my wfs map layer doesn't separate the modeling from the map object file. – Carl Carlson Nov 21 '12 at 16:20
Unless you post your MVC code, It will be very difficult to see what the problem is. – Devdatta Tengshe Nov 21 '12 at 16:34

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.