Skip to content

Converting from UK Grid Ref to WGS84 (for Google maps API) #35

Answered by dvdoug
stevegoddard asked this question in Q&A
Discussion options

You must be logged in to vote

Hello

You're going from OSGB36 (National Grid)...to OSGB36 with that code. I think you probably want $to_crs = Geographic2D::fromSRID(Geographic2D::EPSG_WGS84);

Side note: Out of the box v4 will use a Helmert transform for this (like v3 did). In the next few days (next release), it will be able to use the definitive OSTN15 transform instead if php-coord/datapack-europe is also installed.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stevegoddard
Comment options

Answer selected by stevegoddard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants