com.supermap.services.components

Interface Map

  • All Known Implementing Classes:
    MapImpl


    public interface Map
    

    Map service component interface.

    ${services_components_Map_Description}

    • Method Detail

      • clearCache

        void clearCache(Rectangle2D bounds)
                        throws MapException
        

        ${services_components_Map_method_clearCachebyBounds_Title}

        ${services_components_Map_method_clearCachebyBounds_Description}

        Parameters:
        bounds - ${services_components_Map_method_clearCachebyBounds_param_bounds}
        Throws:
        MapException - ${services_components_Map_method_clearCachebyBounds_throws_MapException}
      • clearCache

        void clearCache(Rectangle2D bounds,
                      MapParameter mapParameter,
                      ImageOutputOption outputOption)
                        throws MapException
        

        Clears the cache within specified map extent.

        Parameters:
        bounds - The specified map extent.
        mapParameter - Map parameters.
        outputOption - Image output settings.
        Throws:
        MapException - A map service component exception.
      • getMapNames

        java.util.List<java.lang.String> getMapNames()
        

        ${services_components_Map_method_getMapNames_Title}

        ${services_components_Map_method_getMapNames_Description}

        Returns:
        ${services_components_Map_method_getMapNames_return}
      • getMapParameter

        MapParameter getMapParameter(java.lang.String mapName)
                                     throws MapException
        

        Gets parameters of the specified map.

        Parameters:
        mapName - The map name.
        Returns:
        Map parameters.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • getMapImage

        MapImage getMapImage(MapParameter mapParameter,
                           ImageOutputOption outputOption)
                             throws MapException
        

        Gets map images according to map parameters and image output settings.

        Parameters:
        mapParameter - Map parameters.
        outputOption - Image output settings.
        Returns:
        The retrieved map image object.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • getResource

        java.lang.String getResource(ResourceParameter resourceParameter)
                                     throws MapException
        

        ${services_components_Map_method_getResource_Title}

        ${services_components_Map_method_getResource_Description}

        Parameters:
        resourceParameter - ${services_components_Map_method_getResource_param_resourceParameter}
        Returns:
        ${services_components_Map_method_getResource_return}
        Throws:
        MapException - ${services_components_Map_method_getResource_throws_MapException}
      • getResource

        byte[] getResource(ResourceParameter resourceParameter,
                         Point2D[] points)
                           throws MapException
        
        Gets resource image according to resource image parameter.
        Parameters:
        resourceParameter - The resource image parameter, including the image height, width, type, resource type, style, etc
        points - The points used to draw resource images.
        Returns:
        Binary stream of the image.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • getResource

        byte[] getResource(java.lang.String mapName,
                         java.lang.String symbolId,
                         OutputFormat format)
                           throws MapException
        
        Gets resource image according to resource image parameter.
        Parameters:
        symbolId - Symbol id.
        format - Symbol Format.
        Returns:
        Binary stream of the image.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • measureDistance

        MeasureResult measureDistance(java.lang.String mapName,
                                    Point2D[] points,
                                    MeasureParameter measureParameter)
                                      throws MapException
        

        ${services_components_Map_method_measureDistance_Title}

        ${services_components_Map_method_measureDistance_Description}

        Parameters:
        mapName - ${services_components_Map_method_measureDistance_param_mapName}
        points - ${services_components_Map_method_measureDistance_param_points}
        measureParameter - ${services_components_Map_method_measureDistance_param_measureParameter}
        Returns:
        ${services_components_Map_method_measureDistance_return}
        Throws:
        MapException - ${services_components_Map_method_measureDistance_throws_MapException}
      • measureArea

        MeasureResult measureArea(java.lang.String mapName,
                                Point2D[] points,
                                MeasureParameter measureParameter)
                                  throws MapException
        

        ${services_components_Map_method_measureArea_Title}

        ${services_components_Map_method_measureArea_Description}

        Parameters:
        mapName - ${services_components_Map_method_measureArea_param_mapName}
        points - ${services_components_Map_method_measureArea_param_points}
        measureParameter - ${services_components_Map_method_measureArea_param_measureParameter}
        Returns:
        ${services_components_Map_method_measureArea_return}
        Throws:
        MapException - ${services_components_Map_method_measureArea_throws_MapException}
      • queryByDistance

        QueryResult queryByDistance(java.lang.String mapName,
                                  Geometry geometry,
                                  double distance,
                                  QueryParameterSet queryParameters)
                                    throws MapException
        

        Queries the geometric objects on a specified map whose distances to a specified geometry are within a certain value.

        Which means to query all the geometries within a circle whose center is the specified geometry.

        Parameters:
        mapName - The map name.
        geometry - The geometric object.
        distance - The unit of the distance extent is identical to that of dataset coordinates corresponding to the current map.
        queryParameters - Query parameters can query multiple layers of a map. The query parameters in a single layer can be set in queryParameters.queryParams[i] .
        Returns:
        Query result object.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • queryByGeometry

        QueryResult queryByGeometry(java.lang.String mapName,
                                  Geometry geometry,
                                  SpatialQueryMode spatialQueryMode,
                                  QueryParameterSet queryParameters)
                                    throws MapException
        

        ${services_components_Map_method_queryByGeometry_Title}

        ${services_components_Map_method_queryByGeometry_Description}

        Parameters:
        mapName - ${services_components_Map_method_queryByGeometry_param_mapName}
        geometry - ${services_components_Map_method_queryByGeometry_param_geometry}
        spatialQueryMode - ${services_components_Map_method_queryByGeometry_param_spatialQueryMode}
        queryParameters - ${services_components_Map_method_queryByGeometry_param_queryParameters}
        Returns:
        ${services_components_Map_method_queryByGeometry_return}
        Throws:
        MapException - ${services_components_Map_method_queryByGeometry_throws_MapException}
      • queryBySQL

        QueryResult queryBySQL(java.lang.String mapName,
                             QueryParameterSet queryParameters)
                               throws MapException
        

        ${services_components_Map_method_queryBySQL_Title}

        ${services_components_Map_method_queryBySQL_Description}

        Parameters:
        mapName - ${services_components_Map_method_queryBySQL_param_mapName}
        queryParameters - ${services_components_Map_method_queryBySQL_param_queryParameters}
        Returns:
        ${services_components_Map_method_queryBySQL_return}
        Throws:
        MapException - ${services_components_Map_method_queryBySQL_throws_MapException}
      • queryByBounds

        QueryResult queryByBounds(java.lang.String mapName,
                                Rectangle2D bounds,
                                QueryParameterSet queryParameters)
                                  throws MapException
        

        Queries the geometries in the specified range on the map.

        Parameters:
        mapName - The map name.
        bounds - The specified query bounds.
        queryParameters - Query parameters can query multiple layers of a map. The query parameters in a single layer can be set in queryParameters.queryParams[i] .
        Returns:
        Query result object.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • setDefaultMapParameter

        MapParameter setDefaultMapParameter(MapParameter mapParameter)
                                            throws MapException
        

        ${services_components_Map_method_setDefaultMapParameter_Title}

        ${services_components_Map_method_setDefaultMapParameter_Description}

        Parameters:
        mapParameter - ${services_components_Map_method_setDefaultMapParameter_param_mapParameter}
        Returns:
        ${services_components_Map_method_setDefaultMapParameter_return}
        Throws:
        MapException - ${services_components_Map_method_setDefaultMapParameter_throws_MapException}
      • getDefaultMapParameter

        MapParameter getDefaultMapParameter(java.lang.String mapName)
                                            throws MapException
        

        ${services_components_Map_method_getDefaultMapParameter_Title}

        ${services_components_Map_method_getDefaultMapParameter_Description}

        Parameters:
        mapName - ${services_components_Map_method_getDefaultMapParameter_param_mapName}
        Returns:
        ${services_components_Map_method_getDefaultMapParameter_return}
        Throws:
        MapException - ${services_components_Map_method_getDefaultMapParameter_throws_MapException}
      • pan

        MapImage pan(double offsetX,
                   double offsetY,
                   MapParameter mapParameter,
                   ImageOutputOption outputOption)
                     throws MapException
        

        Map panning.

        Parameters:
        offsetX - Geographic coordinates offset in the horizontal axis.
        offsetY - Geographic coordinates offset in the vertical axis.
        mapParameter - Map parameters.
        outputOption - Image output settings.
        Returns:
        The map image object.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • viewByBounds

        MapImage viewByBounds(Rectangle2D bounds,
                            MapParameter mapParameter,
                            ImageOutputOption outputOption)
                              throws MapException
        

        Displays map according to the bounds of geographic coordinates.

        Parameters:
        bounds - The bounds of geographic coordinates.
        mapParameter - Map parameters.
        outputOption - Image output settings.
        Returns:
        The map image object.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • viewByScale

        MapImage viewByScale(Point2D center,
                           double scale,
                           MapParameter mapParameter,
                           ImageOutputOption outputOption)
                             throws MapException
        

        Center point.

        Parameters:
        center - Center point.
        scale - The specified scale.
        mapParameter - Map parameters.
        outputOption - Image output settings.
        Returns:
        The map image object.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • zoom

        MapImage zoom(Point2D center,
                    double ratio,
                    MapParameter mapParameter,
                    ImageOutputOption outputOption)
                      throws MapException
        

        Performs map scaling according to the specified center point, zoom scale, map parameter and image output settings.

        Parameters:
        center - Center point.
        ratio - Zoom scale.
        mapParameter - Map parameters.
        outputOption - Image output settings.
        Returns:
        The map image object.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • viewEntire

        MapImage viewEntire(MapParameter mapParameter,
                          ImageOutputOption outputOption)
                            throws MapException
        

        Displays a map in the Full Extent mode according to map parameters and image output settings.

        Parameters:
        mapParameter - Map parameters.
        outputOption - Image output settings.
        Returns:
        The map image object.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • getTrackingLayerImage

        MapImage getTrackingLayerImage(MapParameter mapParameter,
                                     ImageOutputOption outputOption)
                                       throws MapException
        

        Gets images of TrackingLayer according to map parameters and image output settings.

        Parameters:
        mapParameter - Map parameters.
        outputOption - Image output settings.
        Returns:
        The map image object.
        Throws:
        MapException - Displays a map according to the specified center point and scale.
      • findNearest

        QueryResult findNearest(Geometry geometry,
                              double maxDistance,
                              QueryParameterSet queryParameter,
                              java.lang.String mapName)
                                throws MapException
        

        Queries the geometric objects on a specified map whose distances to a specified geometry are within a certain value.

        When limit the number of returned geometric objects (specified by QueryParameterSet.expectCount), the query result is the expectCount features nearest to the center in the records. There is no orders of expectCount.

        Parameters:
        geometry - ${services_components_Map_method_findNearest_param_geometry}
        maxDistance - The unit of the distance extent is identical to that of dataset coordinates corresponding to the current map.
        queryParameter - ${services_components_Map_method_findNearest_param_queryParameter}
        mapName - ${services_components_Map_method_findNearest_param_mapName}
        Returns:
        ${services_components_Map_method_findNearest_return}
        Throws:
        MapException - ${services_components_Map_method_findNearest_throws_MapException}
      • viewEntire

        MapImage viewEntire(java.lang.String layerName,
                          MapParameter mapParameter,
                          ImageOutputOption outputOption)
                            throws MapException
        

        Displays a map in the Full Extent mode according to map layer name, map parameters and image output settings.

        The full geographic map extent to display is the minimum circumscribed rectangle of the specified layer.

        Parameters:
        layerName - Layer name, used to determine the full map extent.
        mapParameter - Map parameters.
        outputOption - Image output settings.
        Returns:
        The Map object.
        Throws:
        MapException - If error occurs during the map display procedure, then it will throw an exception about map service component.
      • getOverview

        Overview getOverview(MapParameter mapParameter,
                           ImageOutputOption outputOption)
                             throws MapException
        

        Gets eagle-eye map according to map parameters and image output settings.

        Parameters:
        mapParameter - Map parameters.
        outputOption - Image output settings.
        Returns:
        Eagle-eye object.
        Throws:
        MapException - A map service component exception.
      • getUTFGrid

        UTFGridResult getUTFGrid(UTFGridParameter gridParameter)
                                 throws MapException
        
        Extracts the UTFGrid JSON object from a specified layer according to the map extent.
        Parameters:
        gridParameter - UTFGrid request parameters.
        Returns:
        The corresponding JSONObject of the UTFGrid.
        Throws:
        MapException - A map service component exception.
      • getMVTTile

        byte[] getMVTTile(VectorTileParameter vectorTileParameter)
                          throws MapException
        

        Gets MVT tile of the map.

        Parameters:
        vectorTileParameter - The parameters of the vector tile.
        Returns:
        The MVT map tile data.
        Throws:
        MapException
      • support

        boolean support(java.lang.String mapName,
                      MapCapability capability)
        
        Determines whether the map supports the specified function.
        Parameters:
        mapName - The map name.
        capability - Function type.
        Returns:
        true means to support; otherwise, false.
        Since:
        7.0.1
      • getVectorStyle

        VectorStyle getVectorStyle(java.lang.String mapName,
                                 java.lang.String[] layerNames,
                                 VectorStyleType type)
                                   throws MapException
        
        Gets the specified vector layer style in the specified map.
        Parameters:
        mapName - The map name.
        layerNames - The layer name.
        type - The vector style type.
        Returns:
        The string of the vector style.
        Throws:
        MapException
        Since:
        8.0.3
      • updateVectorStyle

        void updateVectorStyle(java.lang.String mapName,
                             java.lang.String layerName,
                             VectorStyleType type,
                             java.lang.String style)
                               throws MapException
        
        Updates the specified vector layer style in the specified map.
        Parameters:
        mapName - The map name.
        layerNames - The layer name.
        type - The vector style type.
        Throws:
        MapException
        Since:
        8.0.3
      • listMVTSprites

        java.lang.String[] listMVTSprites(java.lang.String mapName)
        
        Lists all the Sprites names of the MVT.
        Parameters:
        mapName - The map name.
        Returns:
        Sprites names list.
      • getMVTSpriteJson

        java.lang.String getMVTSpriteJson(java.lang.String mapName,
                                        java.lang.String spriteName)
        
        Gets the json of the MVT Sprite.
        Parameters:
        mapName - The map name.
        spriteName - Sprite name.
        Returns:
        The json of the MVT Sprite.
      • getMVTSpriteResource

        byte[] getMVTSpriteResource(java.lang.String mapName,
                                  java.lang.String spriteName)
        
        Gets the resource of the MVT Sprite.
        Parameters:
        mapName - The map name.
        spriteName - Sprite name.
        Returns:
        The Sprite resource data.
      • getMVTFonts

        byte[] getMVTFonts(java.lang.String mapName,
                         java.lang.String fontstack,
                         java.lang.String range)
        
        Gets the font of sdf format.
        Parameters:
        mapName - The map name.
        fontstack - The fontstack name.
        range - rang.
        Returns:
        Font data.
      • updateMap

        boolean updateMap(MapParameter mapParameter)
                          throws MapException
        
        Updates the map status permanently, which will do a persistence in the disk.
        Parameters:
        mapParameter - The map status to update to.
        Returns:
        Whether the update is successful.
        Throws:
        MapException