NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

People, I need a Help. I have one layer on the Geoserver, called Comp5 into a var wmms (it is a point map) I want to put this layer together with a map from Openstreetmap into a var mapnik.

I'm not seeing both map, but just the Openstreetmap (Mapnik). Why? I would like to see the Map of city (from Openstreetmmap) and the points over the city map.

The code I'm using is the following:

<script type="text/javascript" src="js/OpenLayers/OpenLayers.js"></script>
<script type="text/javascript">
var map;

function init() {

    map = new OpenLayers.Map("basicMap",{projection: new OpenLayers.Projection("EPSG:900913"),
    displayProjection: new OpenLayers.Projection("EPSG:4326"),isBaseLayer:false,visibility: true

    var mapnik = new OpenLayers.Layer.OSM();

    var wms = new OpenLayers.Layer.WMS(
            "Marble Blue",
            {layers: 'comp5', transparent:true}//,


    map.setCenter(new OpenLayers.LonLat(-46.69320,-23.64665) // Center of the map


      new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984

      new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection

     ), 11 // Zoom level



Thanks in advance for any help.


asked 12 Aug '11, 02:37

vernei's gravatar image

accept rate: 0%

edited 12 Aug '11, 09:11

RM87's gravatar image


This question is OpenLayers realted and should go to OpenLayers mailing list or asked on IRC: irc:// . You have a higher chance to get help from there.

permanent link

answered 12 Aug '11, 09:17

RM87's gravatar image

accept rate: 22%

edited 12 Aug '11, 09:20

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 12 Aug '11, 02:37

question was seen: 4,897 times

last updated: 12 Aug '11, 09:20

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum