public class BingService extends WebMercatorTileService
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);
MAX_LATITUDE, MAX_LONGITUDE, MIN_LATITUDE, MIN_LONGITUDE, WEB_MERCATOR_CRS
Constructor and Description |
---|
BingService(String name,
String baseUrl) |
Modifier and Type | Method and Description |
---|---|
double[] |
getScaleList()
Returns a list that represents a mapping between zoom-levels and map scale.
|
TileFactory |
getTileFactory()
Returns the TileFactory which is used to call the method getTileFromCoordinate().
|
getBounds, getProjectedTileCrs
addTileToCache, createSafeEnvelopeInWGS84, findTilesInExtent, getBaseUrl, getMaxZoomLevel, getMinZoomLevel, getName, getTileCrs, getTileHeight, getTileWidth, getZoomLevelFromMapScale, getZoomLevelToUse, toString
public double[] getScaleList()
Array index: zoom-level Value at index: map scale High zoom-level -> more detailed map Low zoom-level -> less detailed map
getScaleList
in class TileService
TileService
public TileFactory getTileFactory()
getTileFactory
in class TileService
org.TileService.udig.catalog.internal.wmt.wmtsource.WMTSource#getTileFactory()
Copyright © 1996–2019 Geotools. All rights reserved.