Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java code for WGS84 to Google map position and back

Searching for some sample code for converting a point in WGS84 coordinate system to a map position in Google Maps (pixel position), also supporting zoom levels.

If the codes is well commented, then it can also be in some other language.

You can also point me to a open source Java project :)

Some resources found:

OpenLayer implementation.

JOSM project

Excellent Java Map Projection Library from JH LABS. This is a pure java PROJ.4 port. Does projection from WGS84 to meters. From there it's quite straightforward to convert meters to tile pixels.

like image 590
JaanusSiim Avatar asked Aug 11 '08 10:08

JaanusSiim


People also ask

Does Google Maps use WGS84?

(Google uses the World Geodetic System WGS84 standard.) World coordinates, which reference a point on the map uniquely.

How do I create a map like Google Maps?

Create a mapOn your computer, sign in to My Maps. Click Create a new map. Go to the top left and click "Untitled map." Give your map a name and description.


1 Answers

Tile utility code in Java on mapki.com (great resource for google map developers)

like image 157
andyuk Avatar answered Sep 17 '22 20:09

andyuk