[OpenLayers-Users] Alignment Issue

Matt Kenny matthewkenny at gmail.com
Fri Jun 12 14:56:56 EDT 2009


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?

>
> So all you should need to do is follow the instructions on [1] to set
> up reprojection support for the EPSG codes you are using.
>
> Regards,
> Andreas.
>
> [1] http://trac.openlayers.org/wiki/Documentation/Dev/proj4js
> [2] http://spatialreference.org/
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
m a t t h e w k e n n y
http://www.mkgeomatics.com
Sent from Santa Paula, CA, United States
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090612/1603472f/attachment.html


More information about the Users mailing list