com.supermap.data

Class GeoPlacemark



  • public class GeoPlacemark
    extends Geometry3D
    The GeoPlacemark Class.

    This class is the subclass of the Geometry3D class. This class can place the specified Geometry object and the corresponding name with the given style at its position.

    This class is only supported on Windows and Linux. Note: It is invalid for this class to call the getGeoModel() method, the return value will be null.

    The GeoPlacemark object has three properties such as the name, the style and the corresponding Geometry object. The corresponding Geometry object will determine the display mode of the GeoPlacemark object.

    • If the corresponding Geometry object is point the GeoPlacemark object will display with the name and the point;
    • If the corresponding Geometry object is not point the GeoPlacemark object will display only with the corresponding Geometry object, its name won't show in the 3D map window.
    • Constructor Detail

      • GeoPlacemark

        public GeoPlacemark()
        Constructs a new GeoPlacemark object.
      • GeoPlacemark

        public GeoPlacemark(GeoPlacemark geoPlacemark)
        Constructs a new object identical to the given GeoPlacemark object.
        Parameters:
        geoPlacemark - The given GeoPlacemark object.
      • GeoPlacemark

        public GeoPlacemark(java.lang.String name,
                            Geometry geometry)
        Creates a new GeoPlacemark object according to the specified arguments.
        Parameters:
        name - The specified name of the GeoPlacemark object.
        geometry - The specified Geometry object which is corresponding to the GeoPlacemark object.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the GeoPlacemark object. The name will display at the specified position in the 3D map window.

        The GeoPlacemark object has three properties such as the name, the style and the corresponding Geometry object. The corresponding Geometry object will determine the display mode of the GeoPlacemark object.

        • If the corresponding Geometry object is point the GeoPlacemark object will display with the name and the point;
        • If the corresponding Geometry object is not point the GeoPlacemark object will display only with the corresponding Geometry object, its name won't show in the 3D map window.
        Returns:
        The name of the GeoPlacemark object.
        Default:
        The default value is UntitledPlacemark.
      • setName

        public void setName(java.lang.String value)
        Sets the name of the GeoPlacemark object. The name will display at the specified position in the 3D map window.

        The GeoPlacemark object has three properties such as the name, the style and the corresponding Geometry object. The corresponding Geometry object will determine the display mode of the GeoPlacemark object.

        • If the corresponding Geometry object is point the GeoPlacemark object will display with the name and the point;
        • If the corresponding Geometry object is not point the GeoPlacemark object will display only with the corresponding Geometry object, its name won't show in the 3D map window.
        Parameters:
        value - The name of the GeoPlacemark object.
      • getGeometry

        public Geometry getGeometry()
        Returns the Geometry object which is corresponding to the GeoPlacemark object. The Geometry object can be display as the Feature3D object in the 3D map window and determine the position where the name of the GeoPlacemark object display.

        The GeoPlacemark object has three properties such as the name, the style and the corresponding Geometry object. The corresponding Geometry object will determine the display mode of the GeoPlacemark object.

        • If the corresponding Geometry object is point the GeoPlacemark object will display with the name and the point;
        • If the corresponding Geometry object is not point the GeoPlacemark object will display only with the corresponding Geometry object, its name won't show in the 3D map window.
        Returns:
        The specified Geometry object which is corresponding to the GeoPlacemark object.
        Default:
        The default value is null.
      • setGeometry

        public void setGeometry(Geometry geometry)
        Sets the Geometry object which is corresponding to the GeoPlacemark object. The Geometry object can be display as the Feature3D object in the 3D map window and determine the position where the name of the GeoPlacemark object display.

        The GeoPlacemark object has three properties such as the name, the style and the corresponding Geometry object. The corresponding Geometry object will determine the display mode of the GeoPlacemark object.

        • If the corresponding Geometry object is point the GeoPlacemark object will display with the name and the point;
        • If the corresponding Geometry object is not point the GeoPlacemark object will display only with the corresponding Geometry object, its name won't show in the 3D map window.

        Note that if the type of the geometry object to be set is different from the type the original geometry object, the original geometry object will be disposed.

        Parameters:
        geometry - The specified Geometry object which is corresponding to the GeoPlacemark object.
      • getNameStyle

        public java.time.format.TextStyle getNameStyle()
        Returns the text style of the name of the GeoPlacemark object when displaying in the 3D map window.

        The GeoPlacemark object has three properties such as the name, the style and the corresponding Geometry object. The corresponding Geometry object will determine the display mode of the GeoPlacemark object.

        • If the corresponding Geometry object is point the GeoPlacemark object will display with the name and the point;
        • If the corresponding Geometry object is not point the GeoPlacemark object will display only with the corresponding Geometry object, its name won't show in the 3D map window.
        Returns:
        The text style of the name of the GeoPlacemark object when displaying in the 3D map window.
        Default:
        The default value is {Alignment=TopLeft,BackColor=Color [A=255, R=0, G=0, B=0],BackOpaque=False,Bold=False,FontHeight=6,FontWidth=0,ForeColor=Color [A=255, R=255, G=255, B=255],IsSizeFixed=False,Italic=False,Outline=False,Rotation=0,Shadow=False,Strikeout=False,Underline=False,Weight=0}
      • setNameStyle

        public void setNameStyle(java.time.format.TextStyle textStyle)
        Sets the text style of the name of the GeoPlacemark object when displaying in the 3D map window.

        The GeoPlacemark object has three properties such as the name, the style and the corresponding Geometry object. The corresponding Geometry object will determine the display mode of the GeoPlacemark object.

        • If the corresponding Geometry object is point the GeoPlacemark object will display with the name and the point;
        • If the corresponding Geometry object is not point the GeoPlacemark object will display only with the corresponding Geometry object, its name won't show in the 3D map window.

        Note: The parameter is the TextStyle object, For the setting of text style of the GeoPlacemark object name, only the TextStyle object'ssetForeColor()andsetFontScale()、} methods are valid.

        Parameters:
        textStyle - The text style of the name of the GeoPlacemark object when displaying in the 3D map window.
      • dispose

        public void dispose()
        Disposes the resources occupied by the object. After calling this method, this object will not be usable.
        Overrides:
        dispose in class Geometry
      • clone

        public GeoPlacemark clone()
        Returns a copy of the current GeoPlacemark object.
        Specified by:
        clone in class Geometry
        Returns:
        The new GeoText3D object generated from the clone operation.