[OpenLayers-Users] Problem with Projected Map
Bill Thoen
bthoen at gisnet.com
Fri Aug 8 16:25:57 EDT 2008
I've made a map from a combined set of MapServer layers (two vector
layers and a raster one) and the output projection is UTM Zone 14 WGS 84
(epsg:32614). When I create the map object like this:
var mapOptions = {
maxResolution: 'auto', controls: []
};
map = new OpenLayers.Map( 'map', mapOptions );
it displays the map correctly, but the underlying coordinates are flat
Lat/Long, and they're only correct at the center, which I set
explicitly, and they're increasingly incorrect the further you go from
the center. What I want are the correct projected coordinates. So then I
try the following:
var mapOptions = {
maxResolution: 'auto', controls: [],
maxExtent: new OpenLayers.Bounds(-1782043.9 2240752.7 3256506.0
6482565.5),
projection: "EPSG:32614", units: "m"
};
map = new OpenLayers.Map( 'map', mapOptions );
but this time the map fails to display at all. None of the controls show
either, so I think this is wedging the script.
My map layer call looks like this:
var lyr_base = new OpenLayers.Layer.MapServer(
"North America", "http://MyDomain.com/cgi-bin/mapserv?",
{
map_imagetype: 'AGG',
layer: 'NA',
map: '/var/www/html/piper/ol_usa.map'
}, { singleTile: true });
The output from MapServer is correctly projected, but OL isn't treating
it as projected. I don't think it should matter, but note that this is
a MapServer layer and not a WMS layer.
Does anyone know why this isn't working?
TIA,
- Bill Thoen
More information about the Users
mailing list