Project

General

Profile

Actions

Feature #2031

closed

add lua function (Tile).latitude

Added by Dean Brown 2 months ago. Updated 9 days ago.

Status:
Closed
Priority:
Normal
Category:
Scripting API
Target version:
Start date:
05/18/2026
Due date:
% Done:

0%

Estimated time:

Description

Requirements can deal with latitude, so lua should too.


Files

2031_Main.patch (2.47 KB) 2031_Main.patch Dean Brown, 07/10/2026 11:41 PM
2031_S3_3.patch (2.47 KB) 2031_S3_3.patch Dean Brown, 07/10/2026 11:41 PM

Related issues 1 (1 open0 closed)

Blocks Tasks #1631: S3_3 datafileformat freeze (d3f)NewMarko Lindqvist07/29/2025

Actions
Actions #1

Updated by Dean Brown 2 months ago

  • File 2031_S3_3.patch added
Actions #2

Updated by Dean Brown 2 months ago

  • File 2031_Main.patch added
Actions #3

Updated by Marko Lindqvist 2 months ago

  • Target version changed from 3.3.0 to 3.3.0-d3f
Actions #4

Updated by Marko Lindqvist 2 months ago

  • Blocks Tasks #1631: S3_3 datafileformat freeze (d3f) added
Actions #5

Updated by Marko Lindqvist 2 months ago

  • Status changed from New to In Review
  • Assignee set to Marko Lindqvist
Actions #6

Updated by Marko Lindqvist 16 days ago

  • Status changed from In Review to In Progress
  • Assignee changed from Marko Lindqvist to Dean Brown

int api_methods_tile_latitude(lua_State *L, Tile *ptile)
{
+ LUASCRIPT_CHECK_STATE(L, -1);
+ LUASCRIPT_CHECK_SELF(L, ptile, -1);

return map_signed_latitude(ptile);
+}

Since it normally returns signed latitude -> negative values are valid, it makes no sense to return specifically -1 on error.

Actions #7

Updated by Dean Brown 15 days ago

  • File deleted (2031_S3_3.patch)
Actions #8

Updated by Dean Brown 15 days ago

  • File deleted (2031_Main.patch)

Updated by Dean Brown 15 days ago

Had to think about this one, it has to return something because the function isn't void. Best I can come up with is MAP_MAX_LATITUDE + 1.

Actions #10

Updated by Marko Lindqvist 12 days ago

  • Status changed from In Progress to In Review
  • Assignee changed from Dean Brown to Marko Lindqvist
Actions #11

Updated by Marko Lindqvist 9 days ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF