I am using MapServer to add a WMS layer on a basemap using OpenLayers 3. The mapserver 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...69730.2,777408,331075,959674&FORMAT=image/png", { layers: "Flood_Hazard_Zones", transparent: "true", format: "image/png" });
map.addLayer(zone_wms);
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 overlayed 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.
أكثر...
var zone_wms = new OpenLayers.Layer.WMS("FEMA Flood Zones", "http://localhost:81/cgi-bin/mapserv...69730.2,777408,331075,959674&FORMAT=image/png", { layers: "Flood_Hazard_Zones", transparent: "true", format: "image/png" });
map.addLayer(zone_wms);
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 overlayed 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.
أكثر...