Brad,<br><br>I have an updated version of Proj.js, the last
one had some syntax errors (this one still might, but I have removed
all that I could find, code just needs to be run now), let me know and I can send it over to you. Also here is
the changes I made to Google.js for the conversions.<br><br>-----------------------Google.js-------------------------<br><div id="mb_0"><div><br> getLongitudeFromMapObjectLonLat: function(moLonLat) {<br> if( this.projectionCon
){<br> var points =
this.projectionCon.Forward( new Array(moLonLat.lng(), moLonLat.lat()) );<br> return points[0];<br> }<br> return moLonLat.lng();<br> },<br><br> getLatitudeFromMapObjectLonLat: function(moLonLat) {
<br> if( this.projectionCon ){<br> var points = this.projectionCon.Forward( new Array(moLonLat.lng(), moLonLat.lat()) );<br> return points[1];<br> }<br> return moLonLat.lat();<br>
},<br><br> projectionCon: null,<br> <br> getMapObjectLonLatFromLonLat: function(lon, lat) {<br> if( this.projectionCon ){<br> var points = this.projectionCon.Inverse( new Array(lon, lat) );
<br> return new GLatLng(points[1], points[0]);<br> }<br> return new GLatLng(lon, lat);<br> },<br><br> /* There is probably a better way to do this */<br> setOLtoMapObjectAPITranslation: function(){
<br> this.projection = this.map.projection;<br> if( this.map['resolutions'] ){<br> this.resolutions = this.map['resolutions'];<br> }<br> this.projectionCon = new OpenLayers.Proj
(this.projection);<br> },<br><br>Finally,
here is a function I am working on to fix some of the zoom extent
problems (when switching between layers and for getting the zoom box to
work) . Still needs more testing.<br>
<br> getZoomForExtent: function( bounds ){<br> var moBounds = null;<br> if (bounds != null && this.projectionCon) {<br> var point = this.projectionCon.Inverse( new Array(bounds.left,
bounds.bottom
) );<br> var sw = new GLatLng(point[1], point[0]);<br> point = this.projectionCon.Inverse( new Array(bounds.right, bounds.top) );<br> var ne = new GLatLng(point[1], point[0]);<br> moBounds = new GLatLngBounds(sw, ne);
<br> newZoom = this.mapObject.getBoundsZoomLevel(moBounds);<br> if( newZoom != 0 ){<br> return newZoom;<br> }<br> return this.map.zoom;<br> }<br> return
this.map.zoom;<br> },<br><br>-Justin</div></div>