MapLibre Native for Qt
Loading...
Searching...
No Matches
utils.hpp
1// Copyright (C) 2023 MapLibre contributors
2// Copyright (C) 2019 Mapbox, Inc.
3
4// SPDX-License-Identifier: BSD-2-Clause
5
6#ifndef QMAPLIBRE_UTILS_H
7#define QMAPLIBRE_UTILS_H
8
9#include <QMapLibre/Export>
10#include <QMapLibre/Types>
11
12namespace QMapLibre {
13
15 Online, // Default
17};
18
19Q_MAPLIBRE_CORE_EXPORT NetworkMode networkMode();
20Q_MAPLIBRE_CORE_EXPORT void setNetworkMode(NetworkMode mode);
21
22Q_MAPLIBRE_CORE_EXPORT double metersPerPixelAtLatitude(double latitude, double zoom);
23Q_MAPLIBRE_CORE_EXPORT ProjectedMeters projectedMetersForCoordinate(const Coordinate &coordinate);
24Q_MAPLIBRE_CORE_EXPORT Coordinate coordinateForProjectedMeters(const ProjectedMeters &projectedMeters);
25
26} // namespace QMapLibre
27
28#endif // QMAPLIBRE_UTILS_H
Definition geojson.cpp:10
double metersPerPixelAtLatitude(double latitude, double zoom)
Definition utils.cpp:60
Coordinate coordinateForProjectedMeters(const ProjectedMeters &projectedMeters)
Definition utils.cpp:76
NetworkMode
Definition utils.hpp:14
@ Offline
Definition utils.hpp:16
@ Online
Definition utils.hpp:15
QPair< double, double > Coordinate
Coordinate helper type.
Definition types.hpp:20
void setNetworkMode(NetworkMode mode)
Definition utils.cpp:53
NetworkMode networkMode()
Definition utils.cpp:43
ProjectedMeters projectedMetersForCoordinate(const Coordinate &coordinate)
Definition utils.cpp:67
QPair< double, double > ProjectedMeters
Projected meters helper type.
Definition types.hpp:22