java.lang.Object | |
↳ | com.microstrategy.web.app.maps.TileService |
The tile service reads the tile files and generates the map of tile id and shape ids. By default there is only one tile file named tiles.idx. If user generates extra tiles.idx files, the file can be added to the same folder where the tiles.idx is located and renamed as tiles1.idx or tiles2.idx etc. The tile data file is generated using offline script. The tiles info is generated at zoom level 8. We use Google mercader projection to calculate which tile a LatLng object belongs to or which tiles a bounding box contains.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected static MapProjection | projection |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TileService(String tileIndexFolder)
Class Constructor
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
List<String> |
filterShapesInTiles(LatLng southWest, LatLng northEast, int shapeType, List<String> shapeIds)
For a given bounding box and a given shape id array, find all the shapes that are in the shape id array and inside the given bounding box.
| ||||||||||
List<String> |
getShapesInTiles(LatLng southWest, LatLng northEast, int shapeType)
Retrieves all the shape ids in the bounding box for a given shape type.
| ||||||||||
Map<Integer, List<Integer>> |
getTilesMapForType(Integer shapeType)
Get the hash map of the tile ids and shape id list for a given type.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static BoundingBox |
getBoundingBoxFromLatLngBounds(LatLng southWest, LatLng northEast, int zoomLevel)
Get the bounding box in pixel for the given south west and north east points in map at a given zoom level.
| ||||||||||
static List<Integer> |
getMapTiles(LatLng southWest, LatLng northEast, int zoomLevel)
The function returns a list of title ids at a given zoom level.
| ||||||||||
static Map<Integer, Map<Integer, List<Integer>>> |
loadShapes(String path)
Read the tile data from tile*.idx files and fetch the hash map data for a given shape type.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Class Constructor
tileIndexFolder | The folder path where the tile.idx file is located |
---|
For a given bounding box and a given shape id array, find all the shapes that are in the shape id array and inside the given bounding box.
southWest | The south west of the bounding box. |
---|---|
northEast | The north east of the bounding box. |
shapeType | The shape type. |
shapeIds | The candidate shape ids. |
Retrieves all the shape ids in the bounding box for a given shape type.
southWest | Bounding box south west point. |
---|---|
northEast | Bounding box north east point. |
shapeType | The shape type. |
Get the hash map of the tile ids and shape id list for a given type. The hash map is cached. If the cache is missing, it will go through the file reading process to repopulate the data.
shapeType | The shape type. |
---|
Get the bounding box in pixel for the given south west and north east points in map at a given zoom level.
southWest | The lat and lng of the south west point. |
---|---|
northEast | The lat and lng of the north east point. |
zoomLevel | The current zoom level. |
The function returns a list of title ids at a given zoom level. The tiles are contains within the given bounding box.
southWest | The south west of the bounding box. |
---|---|
northEast | The north east of the bounding box. |
zoomLevel | The zoom level the map is currently in. |
Read the tile data from tile*.idx files and fetch the hash map data for a given shape type.
path | The folder path to all tilex.idx files |
---|