This question already has an answer here:

I am using MapServer to add a WMS layer on a basemap using OpenLayers 3. The WMS generates a png image from a shapefile, which I need to overlay on a basemap. Below is the code which I used to overlay the WMS layer.

var zone_wms = new OpenLayers.Layer.WMS("FEMA Flood Zones",
"http://localhost:81/cgi-bin/mapserv.exe?map=/MapServer/maps/femawms.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=FEMA_NFHL_POLY_STATUS&STYLES=&SRS=EPSG:4326&BBOX=-69730.2,777408,331075,959674&FORMAT=image/png", {
  layers: "Flood_Hazard_Zones",
  transparent: "true",
  format: "image/png"


However, when I do that, the layer is repeated on each of the tile on the basemap. For example, when I am at a zoom level=1, there are 8 images (one of each tile) displayed. When I am at zoom level=2, there are 32 images displayed on the basemap... and so on. Also, I am not sure how to specify the exact location (lat+long+bounding box) of the WMS layer that is overlaid on the map.

I am sure, you would have figured it out that I am newbie to the GIS world..so please forgive me for my ignorance.

marked as duplicate by nmtoken, Mapperz Sep 7 '17 at 13:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • The addition of SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=FEMA_NFHL_POLY_STATUS&STYLES=&SRS=EPSG:4326&BBOX=-69730.2,777408,331075,959674&FORMAT=image/png as your end point in the code is incorrect. – nmtoken Jun 24 '17 at 7:50

I believe this has been answered before, this individual had a similar problem. Best of luck.

Not the answer you're looking for? Browse other questions tagged or ask your own question.