[OpenLayers-Users] Alignment Issue

Christopher Schmidt crschmidt at metacarta.com
Fri Jun 12 15:04:00 EDT 2009


On Fri, Jun 12, 2009 at 11:56:56AM -0700, Matt Kenny wrote:
> On Thu, Jun 11, 2009 at 11:34 PM, Andreas Hocevar <ahocevar at opengeo.org>wrote:
> 
> > Hi,
> >
> > On Fri, Jun 12, 2009 at 4:43 AM, Nicholas
> > Efremov-Kendall<n.e.kendall at gmail.com> wrote:
> > > (i.e. no epsg code attachted). I've tried the reprojection (but on the
> > whole
> > > layer, I don't know if that will work) and all I get is a firebug error
> > > "sites.transform is not a function." Also, note that when I set the if (!
> > > map.getCenter) to the prsites layer it doesn't work.
> >
> > You do not need to do sites.transform() manually, because the GML
> > layer will be reprojected properly the way you set it up.
> >
> > > why does the projectionless GML file in OL show up in the wrong place,
> > > regardless of the EPSG code that I specify (i.e. why doesn't it move when
> > I
> > > specify a different srs?)
> > > why does the projected GML file show up in exactly the sample place?
> > > How do I fix this?
> >
> > Looks like you are not including proj4js.js in your application.
> > OpenLayers out of the box only knows about EPSG:4326 and EPSG:900913.
> 
> 
> This is something that I've always wondered about! I've dug through the
> source code as well as the documentation trying to wrap my brain around
> where/how these two projection definitions are stored internally. Would you
> mind pointing me in the right direction?

http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Layer/SphericalMercator.js#L156

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list