[OpenLayers-Users] Transform/projection Function Error
Arnie Shore
ashore3 at verizon.net
Sat Oct 29 11:08:52 EDT 2011
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
More information about the Users
mailing list