Methods
getDistance(coordA, coordB)
Returns the distance between 2 coordinates of a plan.
Parameters:
Name | Type | Description |
---|---|---|
coordA |
Array.<number> | |
coordB |
Array.<number> |
- Source:
Returns:
number
getProjectedPoint()
Get projected point P' of P on line e1. Faster version.
- Source:
Returns:
projected point p.
This code comes from section 5 of http://www.sunshine2k.de/coding/java/PointOnLine/PointOnLine.html.
The dotProduct function had a bug in the html page. It's fixed here.
(private) getShiftedMultipoint(geometry) → {ol.Geometry.MultiPoint}
Removes the last coordinate of a given geometry (Line or Polygon).
When we draw the last coordinate if tat mouse cursor.
Parameters:
Name | Type | Description |
---|---|---|
geometry |
ol.Geometry | An openlayers geometry. |
- Source:
Returns:
An openlayers MultiPoint geometry.
- Type
- ol.Geometry.MultiPoint