Home > Geopedia API > getTables

getTables

(alias getLayers) Requests a list of the tables/layers on the map (including the turned off layers).

Command JSON members:

  • command: getTables

Response JSON members:

  • command: "getTables",
  • error: true/false,
  • errorMessage: optional message string when error occured,
  • tables: [<list ob tables>] where tables consist of {themeTableId:<ID>, tableId:<ID>, isEnabled:true/false, name:<string>, group:<string>}

Example:

Command: {"command":"getTables"} 

Response: {"command":"getTables","error":false,"tables":[ 
     {"themeTableId":123,"tableId":456,"isEnabled":true,"name":"Good layer","group":"Layers"}, 
     {"themeTableId":987,"tableId":654,"isEnabled":false,"name":"Bad layer","group":"Layers"} 
]}