[OpenLayers-Users] Combining Projection 26917 with Projection 4326

JamSquad Jordan_R_Clark at hotmail.com
Thu Apr 1 09:58:40 EDT 2010


Hey!

I use proj4js and I'm having a problem with projections.  Borders is the
base layer, and it is in projection 26917.

Proj4js.defs["EPSG:26917"] = "+proj=utm +zone=17 +ellps=GRS80 +datum=NAD83
+units=m +no_defs";
Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84
+no_defs";

var proj26917 = new OpenLayers.Projection("EPSG:26917");
var proj4326 = new OpenLayers.Projection("EPSG:4326");

orthoBounds.transform(proj4326, proj26917);

	options = {
	controls: [new OpenLayers.Control.KeyboardDefaults()],
	maxExtent: orthoBounds,
	maxResolution: 425.12060546875,
	projection: proj26917,
	displayProjection: proj26917,
	    units: 'm',
	    numZoomLevels: 21
	};


borders = new OpenLayers.Layer.WMS(
		"Municipal Borders",
		"http://10.10.30.88:8080/geoserver/wms",
		{layers: 'InnisfilMunicipalBorder', transparent: 'true', tiled: 'true',
isBaseLayer: true},
	{opacity: 0.5}
);
	
ortho = new OpenLayers.Layer.WMS(
        "Ortho2008 - Tiled", "http://10.10.30.88:8080/geoserver/wms",
        {
		isBaseLayer: false,
                layers: 'InnisfilGIS:Ortho2008',
                styles: '',
                format: format,
                tiled: 'true',
                tilesOrigin : map.maxExtent.left + ',' +
map.maxExtent.bottom
	},
	{
		buffer: 0,
		displayOutsideMaxExtent: true,
		opacity: 0.3,
//		projection: proj26917,
//		srs: proj26917
	} 
);


These layers only show up alone, never together.  Before, I merged Google
and 26917 and it worked, but this one is just giving me problems.  If anyone
can help I'd appreciate it.  Thanks

JamSquad
-- 
View this message in context: http://n2.nabble.com/Combining-Projection-26917-with-Projection-4326-tp4837221p4837221.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list