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 want to put roads layer (from any source, please recommend some..) on top of my KML polygons and base layer:

baseLayer = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers:"basic"});
            map.addLayer(baseLayer);

Is that possible?

share|improve this question
    
not with wms - try a wfs or wfs-t service en.wikipedia.org/wiki/Web_Feature_Service –  Mapperz Aug 22 '12 at 18:50
add comment

1 Answer

up vote 1 down vote accepted

You can use setLayerIndex and raiseLayer.

Here are some good examples.

share|improve this answer
    
Great, thank you. Do you know some online source where I can find world roads layer? –  againstflow Aug 22 '12 at 21:00
1  
You can find this kind of data here: diva-gis.org/gdata –  drnextgis Aug 23 '12 at 2:07
    
@againstflow Not really, I use the default openstreetmap or google maps layer. the link drnextgis posted looks like it might help. –  CaptDragon Aug 23 '12 at 12:56
    
@againstflow also, remember to mark the answer as correct and upvote if you really think my answer was correct. This will improve your 49% accept rate. People are much less willing to help answer a question from someone with a low accept rate. Because they know they might answer the question correctly and never get credit. You can improve your accept rate by going back in previous questions and marking the best answer as correct. –  CaptDragon Aug 23 '12 at 13:00
    
Ok, thanks for advice. –  againstflow Aug 23 '12 at 14:05
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.