Noob stuff, again: My application will use a single projection throughout, with a lot of LonLats involved. I thought I'd write a single transform/projection function but the mechanics of doing so is throwing me.

I suspect the basic concept may well be wrong, but here's the function, which I hope will return an object.

        function mylonlatproj (_lon_in, _lat_in) {
return new OpenLayers.LonLat((_lon_in ,_lat_in).transform( new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()));
                }

To be called as, say,
map.setCenter(mylonlatproj(_lon,_lat), map.getProjectionObject(), _zoom);
        
But this raising the following error in IE:
         Object doesn't support property or method 'transform'

How do I fix that?  Thanks for any assist, all.  AS
_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to