It looks like you are trying to re-project Google raster layers?<br><br>I thought OpenLayers was only capable of re-projecting vector layers?<br><br>For example, the following article uses OpenLayers (&amp; Proj4JS) to re-project KML and GeoRSS data (geographic coords, WGS84) to a number of different projections (Mollweide, Behrmann, etc):<br>
<br><a href="http://www.geowebguru.com/articles/209-how-to-create-an-online-map-with-a-non-mercator-projection-part-2">http://www.geowebguru.com/articles/209-how-to-create-an-online-map-with-a-non-mercator-projection-part-2</a><br>
<br><br>Richard Marsden<br>Winwaed Software Technology LLC<br><a href="http://www.winwaed.com">http://www.winwaed.com</a><br><a href="http://www.mapping-tools.com">http://www.mapping-tools.com</a><br><a href="http://www.geowebguruc.om">http://www.geowebguruc.om</a><br>
<br><br><div class="gmail_quote">On Thu, Nov 19, 2009 at 12:12 PM, Dash <span dir="ltr">&lt;<a href="mailto:jimlug@co.clackamas.or.us">jimlug@co.clackamas.or.us</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Aloha Thursday folks,<br>
<br>
I am banging my head against the problem for the last several hours.  I have<br>
went through numerous examples and utilized OpenLayers tutorial on<br>
reprojecting points without any success.  I&#39;ve even used the Proj4js Wiki<br>
without any help.  Could some please shed some light on what I am doing<br>
wrong?<br>
<br>
Here is the scenario.  I am trying to transform some coordinates from<br>
EPSG:2913 to EPSG:900913.  I&#39;ve also tried a simplified version using<br>
EPSG:4326 -&gt; EPSG:900913.  Anyway, the transform is not happening for some<br>
odd reason.  I do have the proj4js library within my code and I have added<br>
EPSG definition to my /proj4js/lib/def directory.  I am checking if the<br>
projection by using the getUnits function of the projection class within<br>
OpenLayers.  If the units come back null, then the proj4js library is<br>
unavailable.  Why is this?  I&#39;m so confused.  This should be rather straight<br>
forward.  Anyway, here is some of my code.  Hopefully someone can help me<br>
out.  Thanks.<br>
<br>
&lt;head&gt;<br>
&lt;script src=&quot;<a href="http://openlayers.org/dev/lib/OpenLayers.js" target="_blank">http://openlayers.org/dev/lib/OpenLayers.js</a>&quot;<br>
type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br>
&lt;script src=&quot;./proj4js/lib/proj4js.js&quot;&gt;&lt;/script&gt;<br>
&lt;script src=&quot;proj4js/lib/defs/EPSG2913.js&quot;&gt;&lt;/script&gt;<br>
&lt;script src=&quot;proj4js/lib/defs/EPSG900913.js&quot;&gt;&lt;/script&gt;<br>
&lt;script src=&quot;proj4js/lib/defs/EPSG4326.js&quot;&gt;&lt;/script&gt;<br>
&lt;/head&gt;<br>
<br>
&lt;script type=&quot;text/javascript&quot;&gt;<br>
var map;<br>
function init(){<br>
        var options = {<br>
                //projection: new OpenLayers.Projection(&quot;EPSG:900913&quot;),         // Map projection<br>
                projection: &quot;EPSG:900913&quot;,<br>
                displayProjection: new OpenLayers.Projection(&quot;EPSG:4326&quot;),      // Display<br>
projection<br>
                units: &quot;m&quot;,<br>
                numZoomLevels: 5,<br>
                maxResolution: 156543.0339,<br>
        maxExtent: new OpenLayers.Bounds(-13698618.8209569, 5595988.4768255,<br>
-13521569.8682338, 5701506.49106001)<br>
        };<br>
<br>
        // Initiate Map Controls<br>
        map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
        map.addControl(new OpenLayers.Control.MousePosition());<br>
<br>
        // Create Google Mercator Layers<br>
        var gmap = new OpenLayers.Layer.Google(&quot;Google<br>
Streets&quot;,{&#39;sphericalMercator&#39;: true, numZoomLevels: 20});<br>
        var gphy = new OpenLayers.Layer.Google(&quot;Google Physical&quot;,<br>
{&#39;sphericalMercator&#39;: true, type: G_PHYSICAL_MAP, numZoomLevels: 20});<br>
    var gsat = new OpenLayers.Layer.Google(&quot;Google<br>
Satellite&quot;,{&#39;sphericalMercator&#39;: true, type: G_SATELLITE_MAP, numZoomLevels:<br>
20});<br>
    var ghyb = new OpenLayers.Layer.Google(&quot;Google<br>
Hybrid&quot;,{&#39;sphericalMercator&#39;: true, type: G_HYBRID_MAP, numZoomLevels: 20});<br>
<br>
map.addLayers([gmap, gphy, gsat, ghyb]);<br>
<br>
var srcProj = new OpenLayers.Projection(&quot;EPSG:4326&quot;);<br>
alert(srcProj.getUnits());<br>
var point = new OpenLayers.LonLat(-71, 42);<br>
point.transform(srcProj, map.getProjectionObject());<br>
<br>
if(point.transformed)<br>
        {<br>
                alert(&quot;point already transformed&quot;);<br>
        }<br>
<br>
Proj4js.transform(srcProj, map.getProjectionObject(), point);<br>
<br>
Any suggestions would be greatly appreciated.  THANKS...<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n2.nabble.com/transform-help-please-tp4033462p4033462.html" target="_blank">http://n2.nabble.com/transform-help-please-tp4033462p4033462.html</a><br>
Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</font></blockquote></div><br>