BIS fnc posDegToWorld: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| TKOH | | TKOH | ||
|1.00 | |1.00 | ||
|gr1 = Map and Markers | |gr1 = Map and Markers | ||
| Convert latitude/longtitude coordinates into game world position.<br> | | Convert latitude/longtitude coordinates into game world position.<br> | ||
Line 15: | Line 15: | ||
-122.754367782585,47.3272454065969, {{codecomment|// Bottom Left}} | -122.754367782585,47.3272454065969, {{codecomment|// Bottom Left}} | ||
-121.930117859276,47.8753494907418 {{codecomment|// Top Right}} | -121.930117859276,47.8753494907418 {{codecomment|// Top Right}} | ||
};</code> | };</code> | ||
| [longitude, latitude'', world''] call [[BIS_fnc_posDegToWorld]] | | [longitude, latitude'', world''] call [[BIS_fnc_posDegToWorld]] | ||
|p1= longitude: [[Number]] | |p1= longitude: [[Number]] | ||
|p2= latitude: [[Number]] | |p2= latitude: [[Number]] | ||
|p3= world: [[String]] - (Optional, default [[worldName]]) | |p3= world: [[String]] - (Optional, default [[worldName]]) | ||
| [[Array]] of [[Number|Numbers]] - format [easting, northing, zone] | | [[Array]] of [[Number|Numbers]] - format [easting, northing, zone] | ||
|x1= <code>[47.63959,-122.127249] [[call]] [[BIS_fnc_posDegToWorld]];</code> | |x1= <code>[47.63959,-122.127249] [[call]] [[BIS_fnc_posDegToWorld]];</code> | ||
| [[BIS_fnc_posDegToUTM]], [[BIS_fnc_posUTMToDeg]] | | [[BIS_fnc_posDegToUTM]], [[BIS_fnc_posUTMToDeg]] | ||
}} | }} | ||
Revision as of 23:39, 17 January 2021
Description
- Description:
- Convert latitude/longtitude coordinates into game world position.
World config must contain following settings to convert the position correctly:// Required for scripting mapSize = 61440; // Can differ from mapArea size, as ingame world can be resized mapZone = 10; // UTM zone mapArea[] = { // lon/lat coordinates (not in UTM to assure .kml precision) -122.754367782585,47.3272454065969, // Bottom Left -121.930117859276,47.8753494907418 // Top Right };
- Execution:
- call
- Groups:
- Map and Markers
Syntax
- Syntax:
- [longitude, latitude, world] call BIS_fnc_posDegToWorld
- Parameters:
- longitude: Number
- latitude: Number
- world: String - (Optional, default worldName)
- Return Value:
- Array of Numbers - format [easting, northing, zone]
Examples
- Example 1:
[47.63959,-122.127249] call BIS_fnc_posDegToWorld;
Additional Information
- See also:
- BIS_fnc_posDegToUTMBIS_fnc_posUTMToDeg
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