BIS fnc KMLimport: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Text replacement - "{{Feature|Informative|" to "{{Feature|informative|")
 
(36 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= tkoh
____________________________________________________________________________________________
|version1= 1.00


| tkoh |= Game name
|game2= arma3
|version2= 0.50


|1.00|= Game version
|gr1= Map and Markers
____________________________________________________________________________________________


| <pre>/*
|descr= Read positions from a {{Link|https://en.wikipedia.org/wiki/Keyhole_Markup_Language|KML file}}.
{{Feature|informative|Recommended to execute in loading screen.}}


Description:
|s1= filePath call [[BIS_fnc_KMLimport]]
Read positions from KLM file.
Recommended to execute in loading screen.


Parameter(s):
|p1= filePath: [[String]] - (Optional, default <sqf inline>"hsim\Doc_H\GoogleEarth\Missions\" + missionName + ".kml"</sqf>) KML file path
_this: STRING - path to .kml file
{{Feature|arma3|Default value only works in {{tkoh}}. Do not rely on it in {{arma3}}.}}


Returns:
|r1= [[Array]] of [[Array]]s in format [type, positionXYZ, folder, name, description]
ARRAY of ARRAYs in format [positionXYZ, folder, name, description]
* type: [[Number]] - 0 for a point, 1 for a line, 2 for a polygon
*/
* positionXYZ: [[Position]] - format [[Position#PositionAGL|PositionAGL]]
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
* folder: [[String]] - path to the value, "" if in the .kml root
____________________________________________________________________________________________
* name: [[String]] - location's name
* description: [[String]] - location's description


| <!-- [] call [[BIS_fnc_KMLimport]]; --> |= Syntax
|x1= <sqf>private _data = "subDir\myFile.kml" call BIS_fnc_KMLimport;</sqf>
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[BIS_fnc_keypointsExportFromKML]] [[BIS_fnc_dbImportXML]] [[BIS_fnc_posDegToWorld]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Map|{{uc:KMLimport}}]]
[[Category:Functions|{{uc:KMLimport}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:KMLimport}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:KMLimport}}]]

Latest revision as of 01:25, 2 February 2024

Hover & click on the images for description

Description

Description:
Read positions from a KML file.
Recommended to execute in loading screen.
Execution:
call
Groups:
Map and Markers

Syntax

Syntax:
filePath call BIS_fnc_KMLimport
Parameters:
filePath: String - (Optional, default "hsim\Doc_H\GoogleEarth\Missions\" + missionName + ".kml") KML file path
Arma 3
Default value only works in Take On Helicopters. Do not rely on it in Arma 3.
Return Value:
Array of Arrays in format [type, positionXYZ, folder, name, description]
  • type: Number - 0 for a point, 1 for a line, 2 for a polygon
  • positionXYZ: Position - format PositionAGL
  • folder: String - path to the value, "" if in the .kml root
  • name: String - location's name
  • description: String - location's description

Examples

Example 1:
private _data = "subDir\myFile.kml" call BIS_fnc_KMLimport;

Additional Information

See also:
BIS_fnc_keypointsExportFromKML BIS_fnc_dbImportXML BIS_fnc_posDegToWorld

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note