Methods
-
Convert area
metric
toimperial
.Name Type Description area
number Area in ha
Returns:
Area in acrees.
-
Name Type Description feature
GeoJSONFeature Polygon geojson feature
Returns:
Returntrue
if a polygon feature has intersections
-
Convert degrees minutes seconds to decimal format.
Name Type Description input
string Input string. Format examples:
40° 03' 49.3" N, 3° 24' 42.2" W
,40°03'49"N 3°24'42" W
Returns:
Decimal format. Example41.431,2.41431
-
module:cercaliagl/util.createCircleGeometry(center, radius, vertices){module:cercaliagl/util~GeometryGeoJSON}
-
Create circle geometry given a
center
, a radius and optionally number ofvertices
.Name Type Description center
module:cercaliagl/LonLat~LonLat Center.
radius
number Radius in meters
vertices
number Number of vertices. Default
64
.Returns:
geometry
-
Name Type Description element
string HTML string
Returns:
Marker
-
Name Type Description coordA
Array.<number> Position 1
coordB
Array.<number> Position 2
Returns:
Distance
-
Convert distance
metric
toimperial
.Name Type Description distance
number Distance in meters.
Returns:
distanceImp Distance imperial format string.
-
Calculation distance between two coordinates.
Name Type Description coordA
module:cercaliagl/LonLat~LonLat Coordinate 1,
coordB
module:cercaliagl/LonLat~LonLat Coordinate 2.
Returns:
distance between two coordinates.
-
SaveW route as KML.
Name Type Description wkt
string WKT.
filename
string Filename.
-
Download XML file passing a XML string.
Name Type Description strXML
string XML in string format
filename
string Filename to download.
-
Returns
true
if the coordinate is inside polygon. Polygon must be in WKT format.Name Type Description polygon
string Polygon WKT string
lonLat
module:cercaliagl/LonLat~LonLat Coordinate
Returns:
Returntrue
if position is inside polygon.
-
Transform GeoJSON format to WKT.
Name Type Description geojson
Object GeoJSON - https://geojson.org/
Returns:
WKT - http://es.wikipedia.org/wiki/Well_Known_Text
-
Returns:
Anchor equivalent
-
module:cercaliagl/util.getClosestFeatureByPosition(position, features){module:cercaliagl/Feature~Feature}
-
Get closest feature by a position given a position and a list of features.
Name Type Description position
module:cercaliagl/LonLat~LonLat Position
features
Array.<module:cercaliagl/Feature~Feature> Features
Returns:
Feature
-
module:cercaliagl/util.getClosestLonLatOfFeature(position, feature){module:cercaliagl/LonLat~LonLat}
-
Get closest position of a feature given a coordinate (position)
Name Type Description position
module:cercaliagl/LonLat~LonLat Position
feature
module:cercaliagl/Feature~Feature Feature
Returns:
Coordinate of closest feature
-
Find intersections between a polygon and a linestring
Name Type Description polygonFeature
module:cercaliagl/Feature~Feature Polygon geojson feature 1
lineFeature
module:cercaliagl/Feature~Feature Linestring geojson feature 2
Returns:
Return intersection feature
-
It obtains a partial line in WKT format specifying minimum and maximum percentages in base 1.
Name Type Description feature
module:cercaliagl/Feature~Feature Feature
startfraction
number Min fraction
[0..1]
endfraction
number Max fraction
[0..1]
Returns:
WKT
-
Get formatted adrress from proximity server data response.
Name Type Description data
Proximity result
Name Type Description cercalia
module:cercaliagl/servers~ProximityResultData Returns:
Formatted address.
-
Convert degrees to radiants.
Name Type Description angle
number Angle in degrees
Returns:
Angle in radiants.
-
Transform WKT string to another projection.
Name Type Description wkt
string projectionSrc
string Projection WKT origin
projectionDst
string Projection WKT destination
Returns:
Geometry in WKT format transformed.
-
Transform WKT to KML format (https://developers.google.com/kml/documentation/kmlreference).
Name Type Description wkt
string Geometry in WKT format.
srs
string SRS system. Default:
Proj.EPSG4326
.Returns:
KML object.
-
Transform linestring to polygon adding a buffer.
Name Type Description wkt
string radius
number Radius. Default
10
. -
WKT to Geometry.
Name Type Description wkt
string Returns:
GeoJSON - https://geojson.org/
Type Definitions
-
GeometryGeoJSON{Object}
-
Properties:
Name Type Description type
string Geometry type
coordinates
Array.<number> | Array.<Array.<number>> | Array.<Array.<Array.<number>>>