/** * Calculates the absolute pixel position for a map size and tile size relative to origin * * @param latLong the geographic position. * @param mapSize precomputed size of map. * @return the relative pixel position to the origin values (e.g. for a tile) */ public static Point getPixelRelative(LatLong latLong, long mapSize, Point origin) { return getPixelRelative(latLong, mapSize, origin.x, origin.y); }
/** * Calculates the absolute pixel position for a map size and tile size * * @param latLong the geographic position. * @param mapSize precomputed size of map. * @return the absolute pixel coordinates (for world) */ public static Point getPixelAbsolute(LatLong latLong, long mapSize) { return getPixelRelative(latLong, mapSize, 0, 0); }
/** * Calculates the absolute pixel position for a tile and tile size relative to origin * * @param latLong the geographic position. * @param tile tile * @return the relative pixel position to the origin values (e.g. for a tile) */ public static Point getPixelRelativeToTile(LatLong latLong, Tile tile) { return getPixelRelative(latLong, tile.mapSize, tile.getOrigin()); }
/** * Calculates the absolute pixel position for a map size and tile size relative to origin * * @param latLong the geographic position. * @param mapSize precomputed size of map. * @return the relative pixel position to the origin values (e.g. for a tile) */ public static Point getPixelRelative(LatLong latLong, long mapSize, Point origin) { return getPixelRelative(latLong, mapSize, origin.x, origin.y); }
/** * Calculates the absolute pixel position for a map size and tile size * * @param latLong the geographic position. * @param mapSize precomputed size of map. * @return the absolute pixel coordinates (for world) */ public static Point getPixelAbsolute(LatLong latLong, long mapSize) { return getPixelRelative(latLong, mapSize, 0, 0); }
/** * Calculates the absolute pixel position for a tile and tile size relative to origin * * @param latLong the geographic position. * @param tile tile * @return the relative pixel position to the origin values (e.g. for a tile) */ public static Point getPixelRelativeToTile(LatLong latLong, Tile tile) { return getPixelRelative(latLong, tile.mapSize, tile.getOrigin()); }