# Mini-map Management

Before using the Mini-map API, you need to create a Mini-map API Management object as follows:

local MapMark = class.MapMark.new()

The specific function name and description are as follows:

Serial number Function name Description
1 newShape(...) Add a shape (line, rectangle, circle)
2 deleteShape(...) Delete a shape
3 setShapeColor(...) Set shape color
4 showShape(...) Set shape display or hide
5 updateLine(...) Update shape (line), pass in start and end coordinates
6 updateRectangle(...) Update shape (rectangle), pass in start coordinates and size
7 updateCircle(...) Update shape (circle), pass in center coordinates and radius

# newShape

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Add a shape (line, rectangle, circle)
  • The specific use cases are as follows:
local result = MapMark:newShape(type, isshow, r, g, b)

# deleteShape

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Delete a shape
  • The specific use cases are as follows:
local result = MapMark:deleteShape(shapeid)

# setShapeColor

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Set shape color
  • The specific use cases are as follows:
local result = MapMark:setShapeColor(shapeid, r, g, b)

# showShape

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Set shape display or hide
  • The specific use cases are as follows:
local result = MapMark:showShape(shapeid, showflag)

# updateLine

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Update shape (line), pass in start and end coordinates
  • The specific use cases are as follows:
local result = MapMark:updateLine(shapeid, sx, sz, ex, ez)

# updateRectangle

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Update shape (rectangle), pass in start coordinates and size
  • The specific use cases are as follows:
local result = MapMark:updateRectangle(shapeid, sx, sz, w, h)

# updateCircle

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Update shape (circle), pass in center coordinates and radius
  • The specific use cases are as follows:
local result = MapMark:updateCircle(shapeid, cx, cz, r)
Last Update: 11/22/2019, 2:31:59 PM