Components
keyboard_arrow_up
Add
Line string
-
Description
Line string
The Line string component allows you to draw a sequence open and continuous lines in a component Map. To add new points to the string of lines,drag the midpoint of any segment off the line to enter a new vertex move a vertex by clicking and dragging the vertex to a new one location. Clicking on a vertex will remove the vertex.
-
Events
- Click
- Event that is executed when the user touches slightly or very close to the chain of lines.
- Drag
- Event that is executed when dragging actions are done.
- Long click
- Event that is executed after the user clicks long on the string of lines, but does not trigger a drag (within a given threshold).
- Start drag
- Event that runs immediately after the user starts a drag operation but before any Drag event.
- Stop drag
- Event that is executed after the user releases a string of lines of a drag operation.
-
Procedures
- Distance to feature
- This method calculates the distance between the Line string and the
feature of given map. If 'centroids' is true, the calculation is made between the centroids
of the two
features. If it is false, the distance will be calculated between the two features in
function of closing points.
If the string of lines intersects with the given characteristic, this method will return 0, if an error occurs, this method will return -1.
- Distance to point
- This method calculates the distance between the Line Chain and the latitude and length given. If 'centroids' is true, the calculation is made between the weighted average point of the string of lines to the point. If it is false, the distance is calculated from the most close in to the strign of lines to the point. If the point is in the Line string this method will return 0, if an error occurs this method will return -1.
- Show information box
- This method shows the information box for the Line string if no this 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 information box of the Line string if it is visible. Otherwise, no action is taken.
-
Properties
- 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 line string.
- Draggable (boolean)
- It allows to establish or obtiener if the user can or not drag a map function. This function is accessed by long pressing and then dragging the line string 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 line string.
- Points (list)
- This property gives us the list of points, as pairs of latitude and longitude, in a line string.
- Points from string (text)
- This property provides us with a point chain encoded in GeoJSON to fill a line string. Editing a String of lines in the designer will update this property.
- Stroke color (color)
- This property sets or obtains the color used to delineate the line string.
- Stroke width (number)
- This property sets or obtains the width of the stroke used to delineate the line string.
- Título (text)
- Esta propiedad establece u obtiene el título que se muestra en la ventana de información que aparece cuando el usuario hace clic en la función del mapa.
- Type (text)
- Gets the type of the feature. For line string, the type always it will be "LineString".
- 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.