Class BingService

  • All Implemented Interfaces:

    public class BingService
    extends WebMercatorTileService
    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${code}.jpeg?key=YOUR_BING_KEY&g=129&mkt={culture}&shading=hill&stl=H .

     String baseURL = "${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
      Collection tiles = service.findTilesInExtent(viewportExtent,
              scale, false, 128);
    The "${code}" value will be substituted by the tile code (the quadkey) when the BingTile creates its URL.
    Ugo Taddei
    • Constructor Detail

      • BingService

        public BingService​(String name,
                           String baseUrl)
    • Method Detail

      • 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 class TileService
        mapping between zoom-levels and map scale
        See Also:
      • getTileFactory

        public TileFactory getTileFactory()
        Returns the TileFactory which is used to call the method getTileFromCoordinate().
        Specified by:
        getTileFactory in class TileService
        See Also: