Package com.microstrategy.web.app.maps
Class GoogleMapProjection
- java.lang.Object
-
- com.microstrategy.web.app.maps.GoogleMapProjection
-
- All Implemented Interfaces:
MapProjection
public class GoogleMapProjection extends java.lang.Object implements MapProjection
Google map projection, convert fromLatLng
object to world coordinate and from world coordinate to PixelPoint object.
-
-
Constructor Summary
Constructors Constructor Description GoogleMapProjection()
GoogleMapProjection(int tileSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point
fromLatLngToPoint(LatLng latlng)
Converts the givenLatLng
to the world pixel coordinates, relative to the top-left of the map that provided this ProjectionLatLng
fromPointToLatLng(Point point)
Converts the world coordinate point to theLatLng
coordinate.PixelPoint
fromPointToPixelPoint(Point point, int zoomLevel)
Converts the world coordinate point to the pixel point at a given zoom level.int
getTileSize()
The pixels of the tile in one dimension.
-
-
-
Method Detail
-
getTileSize
public int getTileSize()
Description copied from interface:MapProjection
The pixels of the tile in one dimension.- Specified by:
getTileSize
in interfaceMapProjection
- Returns:
- The size of a tile.
-
fromPointToLatLng
public LatLng fromPointToLatLng(Point point)
Description copied from interface:MapProjection
Converts the world coordinate point to theLatLng
coordinate.- Specified by:
fromPointToLatLng
in interfaceMapProjection
- Parameters:
point
- The worldPoint
coordinate of the point.- Returns:
- The world coordinate of the point.
-
fromLatLngToPoint
public Point fromLatLngToPoint(LatLng latlng)
Description copied from interface:MapProjection
Converts the givenLatLng
to the world pixel coordinates, relative to the top-left of the map that provided this Projection- Specified by:
fromLatLngToPoint
in interfaceMapProjection
- Parameters:
latlng
- TheLatLng
coordinate of the point.- Returns:
- The world coordinate of the point.
-
fromPointToPixelPoint
public PixelPoint fromPointToPixelPoint(Point point, int zoomLevel)
Description copied from interface:MapProjection
Converts the world coordinate point to the pixel point at a given zoom level. The point is relative to the top-left of the map.- Specified by:
fromPointToPixelPoint
in interfaceMapProjection
- Parameters:
point
- The world coordinate point.zoomLevel
- The current zoom level.- Returns:
- The pixel point of the given point.
-
-