Projection

Package: com.eegeo.mapapi.camera

Calculates the mapping between screen space points and world points. Calculation of this mapping requires an asynchronous operation, so results are encapsulated in a Promise object.

Methods

Promise<LatLngAlt> fromScreenLocation(Point point)

Maps a screen point to a point expressed as latitude, longitude, and altitude.

Returns: A promise to provide the real world location displayed on the screen at the point.

The value of the promise can be accessed through an object implementing the Ready interface, for example:

 projection.fromScreenLocation(point)
           .then(new Ready<LatLngAlt>() {
               public void ready(LatLngAlt latLngAlt) {
                   // use value of latLngAlt here
               }
           }
 );
 
Type argument Description
Point point A screen space point, in units of pixels with the origin at the top left corner of the screen.

Promise<Point> toScreenLocation(LatLngAlt location)

Maps a real world point to screen co-ordinates.

Returns: A promise to provide the screen space point corresponding to the real world location, in units of pixels with the origin at the top left corner of the screen.

The value of the promise can be accessed through an object implementing the Ready interface, for example:

 projection.toScreenLocation(latlngalt)
           .then(new Ready<Point>() {
               public void ready(Point pt) {
                   // use value of pt here
               }
           }
 );
 
Type argument Description
LatLngAlt location A real world point.
v0.0.1467
Overview Introduction
Picking PickResult
Widgets (Optional) BlueSphere
Tag Service (Optional) TagService OnTagsLoadCompletedListener
RouteView Widget (Optional) RouteView RouteViewOptions