Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
BindMap Class Reference

Represents a Map Object for BindCanvas. More...

`#include <BindMap.hpp>`

Inheritance diagram for BindMap:

## Public Member Functions
uint16_t | getBytes (uint8_t *out) override
| Get the serialized bytes of the `BindMap` object.

## Public Attributes
int16_t | x
| X-coordinate position of the map.
int16_t | y
| Y-coordinate position of the map.
uint8_t | cmdId = 0
| Command identifier for the map. See the notes for possible cmdId values.
int16_t | width = 100
| Width of the map.
int16_t | height = 100
| Height of the map.
float | lat = 0.0f
| Latitude of the map's center.
float | lon = 0.0f
| Longitude of the map's center.
float | mapOrientation = 0.0f
| Orientation angle of the map (in degrees).
int8_t | zoom = 1
| Zoom level of the map.
Public Attributes inherited from BindView
int16_t | tag

## Detailed Description

Represents a Map Object for BindCanvas.

BindMap

The `BindMap` class is used to display and control a street map within the BindCanvas framework. It allows users to show and interact with maps, including changing the map's location, orientation, and zoom level. Users can manually control the map zoom or use predefined zoom levels.

Note
  Possible cmdId values for a BindView and corresponding effects:
  - BIND_ADD_OR_REFRESH_CMD: Adds the object to the canvas (screen) or refreshes the existing one.
  - BIND_DATA_ONLY_CMD: Refreshes the existing object without moving or resizing; updates data, such as text.
  - BIND_REMOVE_CMD: Removes the object from the canvas (screen).
  - BIND_DISABLE_CMD: Disables the object.
  - BIND_ENABLE_CMD: Enables the object.
  - BIND_HIDE_CMD: Hides the object.
  - BIND_VISIBLE_CMD: Restores the object's visibility.

To use a `BindMap` object, create an instance and configure its properties, including position, dimensions, latitude, longitude, orientation, and zoom level. You can then add it to the BindCanvas for rendering and interaction by calling the sync function.

Attention
  Currently, the framework supports the creation of only one map object. Additional support for multiple maps may be added in future updates.

Note
  The `BIND_MAP_USER_ZOOM` constant can be used to let the user manually change the map's zoom level. You can also set predefined zoom levels as needed.

## Member Function Documentation

## ◆ getBytes()

uint16_t BindMap::getBytes | ( | uint8_t * | out | ) |
| inline override virtual

Get the serialized bytes of the `BindMap` object.

This function serializes the `BindMap` object into a byte array, which can be sent to BindCanvas for rendering and interaction.

Parameters

  out | Pointer to the output buffer where the serialized data will be stored.

Returns
  The number of bytes written to the output buffer.

Reimplemented from BindView.

The documentation for this class was generated from the following file:

- BindMap.hpp