Package org.geotools.tile.impl.bing
Class BingService
Object
TileService
WebMercatorTileService
BingService
- All Implemented Interfaces:
ImageLoader
The Bing tile service.
Note that Bing requires a key, which you can generate here. This service follows the documentation for the Imagery API
In order for the BingService to work correctly, you must use the URL fragment provided by Get Imagery Metadata. In particular, you need to
instantiate a BingService with a URL template such as
http://ecn.subdomain.tiles.virtualearth.net/tiles/r${code}.jpeg?key=YOUR_BING_KEY&g=129&mkt={culture}&shading=hill&stl=H
.
String baseURL = "http://ecn.subdomain.tiles.virtualearth.net/tiles/r${code}.jpeg?key=YOUR_BING_KEY&g=129&mkt={culture}&shading=hill&stl=H;" TileService service = new BingService("Road", baseURL); // you may add to a map: map.addLayer(new TileLayer(service)); // or do some hard work to fetch the tiles CollectionThe "${code}" value will be substituted by the tile code (the quadkey) when the BingTile creates its URL.tiles = service.findTilesInExtent(viewportExtent, scale, false, 128);
- Since:
- 12
- Author:
- Ugo Taddei
-
Field Summary
Fields inherited from class WebMercatorTileService
MAX_LATITUDE, MAX_LONGITUDE, MIN_LATITUDE, MIN_LONGITUDE, WEB_MERCATOR_CRS
Fields inherited from class TileService
cacheSize
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Returns a list that represents a mapping between zoom-levels and map scale.Returns the TileFactory which is used to call the method getTileFromCoordinate().identifyTileAtCoordinate
(double lon, double lat, ZoomLevel zoomLevel) Returns tile identifier for the tile at the given coordinateMethods inherited from class WebMercatorTileService
getBounds, getProjectedTileCrs
Methods inherited from class TileService
createSafeEnvelopeInWGS84, findTilesInExtent, getBaseUrl, getHttpClient, getMaxZoomLevel, getMinZoomLevel, getName, getTileCrs, getTileHeight, getTileWidth, getZoomLevelFromMapScale, getZoomLevelToUse, loadImageTileImage, obtainTile, toString
-
Constructor Details
-
BingService
-
-
Method Details
-
getScaleList
public double[] getScaleList()Returns a list that represents a mapping between zoom-levels and map scale.Array index: zoom-level Value at index: map scale High zoom-level -> more detailed map Low zoom-level -> less detailed map
- Specified by:
getScaleList
in classTileService
- Returns:
- mapping between zoom-levels and map scale
- See Also:
-
getTileFactory
Returns the TileFactory which is used to call the method getTileFromCoordinate().- Specified by:
getTileFactory
in classTileService
- See Also:
-
org.TileService.udig.catalog.internal.wmt.wmtsource.WMTSource#getTileFactory()
-
identifyTileAtCoordinate
Description copied from class:TileService
Returns tile identifier for the tile at the given coordinate- Specified by:
identifyTileAtCoordinate
in classTileService
-