<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN
class=291230120-02102009>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=291230120-02102009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=291230120-02102009>I'm trying to use
proj4js in OL llike this:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=291230120-02102009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=291230120-02102009> var mapcenter
= new OpenLayers.LonLat(lon.text, lat.text);<BR>Proj4js.defs["ESRI:102003"] =
"+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0
+ellps=GRS80 +datum=NAD83 +units=m +no_defs";<BR> var source = new
Proj4js.Proj("EPSG:4326"); </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=291230120-02102009> var dest =
new Proj4js.Proj("EPSG:102003");</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=291230120-02102009>OpenLayers.Projection.transform(mapcenter, source,
dest);</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=291230120-02102009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=291230120-02102009>and at that point I
get thsi error: </SPAN></FONT><FONT><SPAN class=291230120-02102009><SPAN
class="objectBox objectBox-errorMessage hasTwisty hasBreakSwitch"><FONT
face=Arial size=2>source.getCode is not a function</FONT></DIV>
<DIV>
<DIV class=errorTrace><FONT face=Arial size=2></FONT></DIV>
<DIV class="errorSourceBox errorSource-exec"><SPAN class=errorSource><FONT
face=Arial><FONT size=2>OpenLayers.Projection.transforms[source.getCode()]
&&<SPAN class=291230120-02102009>....</SPAN> <SPAN
class=291230120-02102009> (<SPAN
class="objectBox objectBox-errorMessage hasTwisty hasBreakSwitch"><A
class="objectLink objectLink-sourceLink"><FONT face="Times New Roman"
size=3>Projection.js (line
172)</FONT></A></SPAN>)</SPAN></FONT></FONT></SPAN></DIV>
<DIV class="errorSourceBox errorSource-exec"><SPAN class=errorSource><FONT
face=Arial><FONT size=2><SPAN class=291230120-02102009><SPAN
class="objectBox objectBox-errorMessage hasTwisty hasBreakSwitch opened">
<DIV class="objectBox objectBox-stackFrame"> </DIV>
<DIV class="objectBox objectBox-stackFrame"><A
class=objectLink>transform()</A>(<A class="objectLink objectLink-object"><SPAN
class=objectTitle>lon=-122.30785315739,lat=47.638080437239</SPAN> lon=<SPAN
class=objectPropValue>-122.30785315739</SPAN> lat=<SPAN
class=objectPropValue>47.638080437239</SPAN></A><SPAN class=arrayComma>,
</SPAN><A class="objectLink objectLink-object"><SPAN
class=objectTitle>Object</SPAN> srsCodeInput=<SPAN
class=objectPropValue>EPSG:4326</SPAN> srsCode=<SPAN
class=objectPropValue>EPSG:4326</SPAN></A><SPAN class=arrayComma>, </SPAN><A
class="objectLink objectLink-object"><SPAN class=objectTitle>Object</SPAN>
srsCodeInput=<SPAN class=objectPropValue>EPSG:102003</SPAN> srsCode=<SPAN
class=objectPropValue>EPSG:102003</SPAN></A><SPAN class=arrayComma></SPAN>)<SPAN
class="objectLink-sourceLink objectLink">Projection.js (line 172)</SPAN></DIV>
<DIV class="objectBox objectBox-stackFrame"><A
class=objectLink>success()</A>()<SPAN
class="objectLink-sourceLink objectLink">addressform.js (line 93)</SPAN></DIV>
<DIV class="objectBox objectBox-stackFrame"><A
class=objectLink>getViewWidth()</A>(<A
class="objectLink objectLink-function">function()</A><SPAN class=arrayComma>,
</SPAN><SPAN class="objectBox objectBox-undefined">undefined</SPAN><SPAN
class=arrayComma>, </SPAN><SPAN class="objectBox objectBox-array"><SPAN
class=arrayLeftBracket>[</SPAN><A class="objectLink objectLink-object"><SPAN
class=objectTitle>Object</SPAN> tId=<SPAN class=objectPropValue>0</SPAN>
status=<SPAN class=objectPropValue>200</SPAN> statusText=<SPAN
class=objectPropValue>OK</SPAN></A><SPAN class=arrayComma>, </SPAN><A
class="objectLink objectLink-object"><SPAN class=objectTitle>Object</SPAN>
url=<SPAN class=objectPropValue>geocode_integrate.php</SPAN> params=<SPAN
class=objectPropValue>Object</SPAN></A><SPAN class=arrayComma></SPAN> 0=<SPAN
class=objectPropValue>Object</SPAN> 1=<SPAN
class=objectPropValue>Object</SPAN><SPAN
class=arrayRightBracket>]</SPAN></SPAN><SPAN class=arrayComma>, </SPAN><SPAN
class="objectBox objectBox-undefined">undefined</SPAN><SPAN
class=arrayComma></SPAN>)<SPAN
class="objectLink-sourceLink objectLink">ext-base.js (line 9)</SPAN></DIV>
<DIV class="objectBox objectBox-stackFrame"><A
class=objectLink>handleResponse()</A>(<A
class="objectLink objectLink-object"><SPAN class=objectTitle>Object</SPAN>
tId=<SPAN class=objectPropValue>0</SPAN> status=<SPAN
class=objectPropValue>200</SPAN> statusText=<SPAN
class=objectPropValue>OK</SPAN></A><SPAN class=arrayComma></SPAN>)<SPAN
class="objectLink-sourceLink objectLink">ext-all-debug.js (line
5317)</SPAN></DIV>
<DIV class="objectBox objectBox-stackFrame"><A
class=objectLink>getViewWidth()</A>(<A
class="objectLink objectLink-object"><SPAN class=objectTitle>Object</SPAN>
conn=<SPAN class=objectPropValue>XMLHttpRequest</SPAN> tId=<SPAN
class=objectPropValue>0</SPAN></A><SPAN class=arrayComma>, </SPAN><A
class="objectLink objectLink-object"><SPAN class=objectTitle>Object</SPAN>
scope=<SPAN class=objectPropValue>Object</SPAN> argument=<SPAN
class=objectPropValue>Object</SPAN> timeout=<SPAN
class=objectPropValue>30000</SPAN></A><SPAN class=arrayComma>, </SPAN><SPAN
class="objectBox objectBox-undefined">undefined</SPAN><SPAN
class=arrayComma></SPAN>)<SPAN
class="objectLink-sourceLink objectLink">ext-base.js (line 10)</SPAN></DIV>
<DIV class="objectBox objectBox-stackFrame"><A
class=objectLink>getViewWidth()</A>()</DIV></SPAN></SPAN></FONT></FONT></SPAN></DIV>
<DIV class="errorSourceBox errorSource-exec"><SPAN class=errorSource><FONT
face=Arial><FONT size=2><SPAN
class=291230120-02102009></SPAN></FONT></FONT></SPAN> </DIV>
<DIV class="errorSourceBox errorSource-exec"><SPAN class=errorSource><FONT
face=Arial><FONT size=2><SPAN class=291230120-02102009>Any idea what I am
doing wrong ?</SPAN></FONT></FONT></SPAN></DIV></SPAN></SPAN></FONT></DIV>
<P class=MsoNormal align=left><FONT size=2><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">Karsten<BR></SPAN></FONT><FONT
color=#003264 size=1><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana"><A
href="http://www.terragis.net">www.terragis.net</A></SPAN></FONT></P></BODY></HTML>