Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8820133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:31:56+00:00 2026-06-14T05:31:56+00:00

I have a problem with WMS overlays in OpenLayers. Basically I just want to

  • 0

I have a problem with WMS overlays in OpenLayers. Basically I just want to add data from a WMS server as an overlay and not as a base layer. This appears to be a very simple problem but I am unable to find a solution. If I set singleTile to true, the overlays appears over the whole map but you cannot zoom in. If it is set to false, only one tile is displayed at every zoom level. If I set it as a base layer, it works just fine but I really want the overlay solution so I can make it transparent and see the map behind it.

Demonstration of the problem, with a different dataset but the issue is the same:
http://jsfiddle.net/adbnC/2/

I think it might be related to some coordinate system issues but I am no expert so any help is appreciated.

Thanks a lot!

Here is the relevant section of the code that does not work as expected:

var pop_layer = new OpenLayers.Layer.WMS("Population Density in 2000",
    "http://sedac.ciesin.columbia.edu/geoserver/ows", {
        layers: 'gpw-v3:gpw-v3-population-density_2000',
        transparent: true
     }, {
         opacity: 0.5,
         isBaseLayer: false,
         // Setting single tile to true will kind of work but than one
         // cannot zoom in any more.
         singleTile: false
     }
);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:31:57+00:00Added an answer on June 14, 2026 at 5:31 am

    I can’t quite get what exactly is wrong here, but I think it has something to do with messed up reference systems. Here is a workaround:

    Modified Jsfiddle.net

    I changed the map projection to spherical mercator and now it seems to work fine for me:

    var mapOptions = {
        div: "map",
        projection: new OpenLayers.Projection("EPSG:900913"),
        units: "m"
    };
    
    map = new OpenLayers.Map('map', mapOptions);
    
    var osm = new OpenLayers.Layer.OSM();
    map.addLayer(osm);
    
    var pop_layer = new OpenLayers.Layer.WMS("Population Density in 2000", "http://sedac.ciesin.columbia.edu/geoserver/ows", {
        layers: 'gpw-v3:gpw-v3-population-density_2000',
        transparent: true
    }, {
        opacity: 0.5,
        isBaseLayer: false
    });
    
    map.addLayer(osm);
    map.addLayer(pop_layer);
    map.addControl(new OpenLayers.Control.LayerSwitcher());
    map.setCenter(new OpenLayers.LonLat(0, 0), 2);​
    

    Let me know if that helped!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have problem with linq expressions. I want to get from db some data ordered
I have problem SIMILAR to preventing form data reposting, but not quite the same
Have problem while getting data from Memcached on .NET MVC solution. I have this
i have problem to pass data from view to controller , i have view
I have problem in my xampp server php file not work if I write
I have problem with chrome.extension and jQuery Post. I want post some data (get
I have problem with UIWebView delay when the load image from url. In my
I have problem while loading data into html select when users press or click
i have problem to show only day or month from dob in mysql. i
I have problem to write data to file. What I'm doing wrong? SecTrustRef trust

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.