Here’s what worked for me, without so much bs.
int x = (int) ((MAP_WIDTH/360.0) * (180 + lon));
int y = (int) ((MAP_HEIGHT/180.0) * (90 - lat));
The lat,lon coordinates were given to me by Android devices. So they should be in the same standard used by all Google Earth/Map products.
More Related Contents:
- How can I measure distance and create a bounding box based on two latitude+longitude points in Java?
- Smooth GPS data
- Measuring the distance between two coordinates in PHP
- Calculating Distance between two Latitude and Longitude GeoCoordinates
- Getting Latitude and longitude in 30 seconds
- How can I get city name from a latitude and longitude point?
- What datatype to use when storing latitude and longitude data in SQL databases? [duplicate]
- Trilateration using 3 latitude and longitude points, and 3 distances
- How to find my distance to a known location in JavaScript
- How to convert an address to a latitude/longitude?
- Get latitude and longitude based on location name with Google Autocomplete API
- Polygon area calculation using Latitude and Longitude generated from Cartesian space and a world file
- Convert from latitude, longitude to x, y
- Converting latitude and longitude to decimal values
- 3D coordinates on a sphere to Latitude and Longitude
- Algorithm to find all Latitude Longitude locations within a certain distance from a given Lat Lng location
- Getting GPS coordinates on Windows phone 7
- Getting GPS data from an image’s EXIF in C#
- Determine if one coordinate is in radius of another
- Easting northing to latitude longitude
- Find distance between two points using latitude and longitude in mysql
- ICS Android enable gps programmatically?
- Calculating bearing between two CLLocationCoordinate2Ds
- Console App Mouse-Click X Y Coordinate Detection/Comparison
- mySQL longitude and latitude query for other rows within x mile radius
- What exactly are eye space coordinates?
- How to get current date and time from GPS unsegment time in python
- Plot coordinates on map
- Algorithm to generate a hexagonal grid with coordinate system
- Geocode multiple addresses