[OpenLayers-Users] Problem with Projected Map

Arnd Wippermann arnd.wippermann at web.de
Fri Aug 8 18:08:35 EDT 2008


If your code snippet is correct then it is wrong, because you forget the
kommas.

>    maxExtent: new OpenLayers.Bounds(-1782043.9 2240752.7 3256506.0
6482565.5),
    maxExtent: new
OpenLayers.Bounds(-1782043.9,2240752.7,3256506.0,6482565.5),

Arnd

-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Bill Thoen
Gesendet: Freitag, 8. August 2008 22:26
An: users at openlayers.org
Betreff: [OpenLayers-Users] Problem with Projected Map

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

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list