Thanks for replying
I had put the definition in but the error is the same. I have removed all references to Proj4js from my code but just having the script included causes the error. Thanks Tom From: [email protected] [mailto:[email protected]] On Behalf Of Michael Adair Sent: 23 October 2012 14:58 To: [email protected] Subject: Re: [Users] Problem with PrintPreview ux and Proj4js Did you include the definition for EPSG:27700 somewhere in your code? Proj4js.defs["EPSG:27700"] = "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs"; Mike On 23/10/2012 8:08 AM, Thomas Colley wrote: Hi I have created an OpenLayers map with print functionality using the GeoExt.ux.PrintPreview. This was working fine until I added the proj4js script to the page. Now clicking on the Print button gives me the following error TypeError: p.proj is undefined if (window.Proj4js && this.proj.defData && p.proj.defData) { When I click on the Print button 'p' is coming back in Firebug as the value 'EPSG:4326' instead of an OpenLayers.Projection object as it does at all other times when viewing the map. So the main problem is that something is passing projection through as a value instead of an object so that projection.proj is undefined, and a further problem is that the value is for the wrong EPSG anyway as my map is all in ESPG:27700. Is there somewhere else within the code that I need to define the projection? It is correctly defined in the map and comes back as EPSG:27700 { projCode="EPSG:27700", proj={...}, titleRegEx=RegExp, more...} in firebug. I have edited the code in OpenLayers 'Projection.js' to make 'p = new OpenLayers.Projection("EPSG:27700")' and with this change the print preview window appears as it should. Hope somebody can help as I am stuck on this. Many thanks Tom _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
<<image001.png>>
_______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
