Marker

  • Description

      Marker

      The Marker component indicates points on a map, such as buildings or points of interest. The markers can be customized from many ways, such as the use of custom images of the application's resources. Markers can also be created dynamically using the procedure 'Create Marker' and configure it using the "Any component" blocks.

  • Events

    • On click
    • Event that is executed when the Marker is clicked.
    • Drag
    • Event that is executed when dragging actions in the Marker.
    • On long click
    • Event that is executed when a long click is made on the Marker but without triggering a drag. Therefore for this procedure to run the 'Draggable' property must be false.
    • Start drag
    • Event that is executed before a drag operation begins. For example you can use this event to save the current position of the Marker.
    • Stop drag
    • Event that is executed after the drag operation has been completed. For example, you can use this event to save the new position of the Marker.
  • Procedures

    • Bearing to feature
    • This method returns the course of the marker to the given features, in degrees from the north. If the parameter 'centroids' is true, the heading will be in the center of the function of the map. Otherwise, the heading will be calculated to the point in feature closest to the Marker.
    • Bearing to point
    • This method returns the bearing from the Marker to latitude and longitude specified, in degrees from the north right.
    • Distance to feature
    • This method calculates the distance between the Marker and the feature of given map. If 'centroids' is true, the calculation is made between the centroids of the two characteristics. Otherwise, the distance will be calculated between the two features depending on the closest points.
      If 'centroids' is false, this method will return 0 if the Marker is crossed or is contained in the introduced character. If it happens an error, this method will return -1.
    • distance to point
    • This method calculates the distance between the Marker and the latitude and given length. If 'centroids' is true, the distance is calculated from the center of the Marker up to the given point. Otherwise, the distance is calculated from the nearest point in the Marker up to the given point.
      If 'centroids' is false and the point is in the Marker, this method will return 0. If an error occurs, -1 will be returned.
    • Show information box
    • This method shows the information box for the Marker if it is not visible. Otherwise, this method has no effect. This method can be used to show the information box though the 'Enable Information Box' property is false.
    • Hide information box
    • This method hides the Marker information box if it is visible. Otherwise, no action is taken.
    • Set location
    • This method moves the center of the Marker to latitude and longitude specified. This method is more efficient than setting the latitude and longitude separately.
  • Properties

    • Horizontal anchor (number)
    • It allows to establish or obtain the horizontal anchor of the center of the marker in relation to your image. Valid values ​​are 1 (left), 2 (right), 3 (center).
    • Vertical anchor (number)
    • It allows to establish or obtain the vertical anchor of the center of the marker in relation to your image. Valid values ​​are 1 (up), 2 (center), 3 (down).
    • Description (text)
    • It allows to establish or obtain the description that is shown in the window of information. The information window appears when the user touches the marker.
    • Draggable (boolean)
    • Allows you to set or obtiener if the user can or can not drag the marker when pressed and dragged to a new location.
    • Enable Information Box (boolean)
    • This property enables or disables the display of the window of the Information box when the user touches the Marker.
    • Height (number)
    • Set or get the height of the Marker.
    • Height in percentage (number)
    • Set or obtain the height of the Marker in percent.
    • Width (number)
    • Set or obtain the width of the Marker.
    • Width in percentage (number)
    • Sets or obtains the width of the Marker in percent.
    • Image asset
    • This property sets or obtains the image that is displayed for the marker. If an empty string "" is set, the bookmark icon will be used predetermined.
    • Latitude (number)
    • This property establishes or obtains the latitude of the center of the Marker, in degrees. Positive values ​​are represented north of the equator and negative values they represent south of the equator. To update the latitude and longitude simultaneously, use the 'Set location' procedure.
    • Longitude (number)
    • This property establishes or obtains the longitude of the center of the Marker, in degrees. The positive values ​​represent the east of the main meridian and values negative represent the west of the main meridian. To update the latitude and longitude simultaneously, use the 'Set location' procedure.
    • Fill color (color)
    • This property sets or obtains the color used to complete the Marker. This property only applies to bookmarks that use vector images, including the default icon.
    • Stroke color (color)
    • This property sets or obtains the color used to delineate the Marker.
    • Stroke width (number)
    • This property sets or obtains the width of the stroke used to delineate the Marker.
    • Title (text)
    • This property establishes or obtains the title that is displayed in the window of information that appears when the user clicks on the Bookmark.
    • Type (text)
    • Gets the type of the feature. For Marker, the type will always be "Marker".
    • Visible
    • This property establishes or obtains if the component should be visible in the screen. The value is true if the component is displayed and false if it is hidden.