com.supermap.services.providers

Class BingMapsMapProvider

  • All Implemented Interfaces:
    Disposable, MapProvider, ProviderContextAware


    public class BingMapsMapProvider
    extends RemoteTileProviderBase
    

    BingMaps the map service provider.

    BingMapsMapProvider provides the ability to get map services from Bing Maps online services and encapsulates GIS functionality related to SuperMap iServer .

    • Constructor Detail

      • BingMapsMapProvider

        public BingMapsMapProvider(BingMapsMapProviderSetting setting)
        

        Constructors with parameters

        Parameters:
        setting - Map service provider configuration
      • BingMapsMapProvider

        public BingMapsMapProvider()
        

        Default constructor

    • Method Detail

      • getSupportScales

        public double[] getSupportScales(java.lang.String mapName)
        
        Get a collection of supported scales
        Parameters:
        mapName -
        Returns:
      • getSupportResolutions

        public double[] getSupportResolutions(java.lang.String mapName)
        
        Description copied from class: TiledMapProviderBase

        Returns the resolution of the current service support. If all resolutions are supported, empty is returned.

        Specified by:
        getSupportResolutions in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        Returns:
        The resolution array.
      • getSupportImageFormat

        public OutputFormat[] getSupportImageFormat(java.lang.String mapName)
        

        Gets an array of supported image formats.

        Specified by:
        getSupportImageFormat in class TiledMapProviderBase
        Parameters:
        mapName - Map name
        Returns:
        An array of supported image formats
      • initDefaultMapParameter

        protected java.util.Map<java.lang.String,MapParameter> initDefaultMapParameter()
        
        Initialize the default map state.
        Specified by:
        initDefaultMapParameter in class TiledMapProviderBase
        Returns:
        Map status mapping. The key is the map name, and the value is the map parameter object.
      • getOrigin

        protected Point2D getOrigin(java.lang.String mapName)
        
        Description copied from class: TiledMapProviderBase

        Get the geographical coordinate of left upper corner of the map.

        Specified by:
        getOrigin in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        Returns:
        The geographical coordinate of left upper corner of the map.
      • isResolutionEquals

        protected boolean isResolutionEquals(double resolution1,
                                 double resolution2)
        
        Description copied from class: TiledMapProviderBase

        Determines if two resolutions are within the tolerance (1.0E-6)

        Overrides:
        isResolutionEquals in class TiledMapProviderBase
        Parameters:
        resolution1 - double
        resolution2 - double
        Returns:
        Is it equal
      • loadMetaData

        protected boolean loadMetaData()
        

        Load the REST service metadata information.

        Returns:
        Returns true if the load was successful, false otherwise.
      • initLODInfos

        protected boolean initLODInfos()
        
        Initializes tile information.
      • getTileImageUrl

        protected java.lang.String getTileImageUrl(java.lang.String mapName,
                                       int colIndex,
                                       int rowIndex,
                                       double currentResolution)
        
        Calculates the tile's url.
        Parameters:
        colIndex -
        rule -
        currentResolution -
        Returns:
      • getRemoteTileImageUrl

        protected java.lang.String getRemoteTileImageUrl(int colIndex,
                                             int rowIndex,
                                             double currentResolution)
        
        Gets the address of the remote server.
        Parameters:
        colIndex -
        rule -
        currentResolution -
        Returns:
      • getSubDomain

        protected java.lang.String getSubDomain()
        
        Randomly return a field.
        Returns:
      • getLevel

        protected int getLevel(double resolution)
        
        According to the resolution to obtain the corresponding level
        Parameters:
        resolution -
        Returns:
      • getMapName

        protected java.lang.String getMapName()
        
        Gets the map name.
        Returns:
      • getSubDomains

        protected java.util.List<java.lang.String> getSubDomains()
        
        Gets a list of map server domain names.
        Returns:
      • setSubdomains

        protected void setSubdomains(java.util.List<java.lang.String> subdomains)
        
        Sets a list of map server domain names.
        Parameters:
        subdomains -
      • getBingMapsTileTemplate

        protected java.lang.String getBingMapsTileTemplate()
        
        Gets the url template for the bing maps tile
        Returns: