-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy paths3eMapView.s4e
59 lines (49 loc) · 2.55 KB
/
s3eMapView.s4e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# The s3eMapView extension
#
# Displays a map using native Android or iOS controls.
#
callbacks
include:
#include <s3eTypes.h>
enum s3eMapViewCallback
{
S3E_MAPVIEW_CALLBACK_POI_SELECTED, // User has tapped/clicked on a POI
S3E_MAPVIEW_CALLBACK_MAX
};
struct s3eMapView;
struct s3eMapViewPOI;
struct s3eMapViewCoord {
double lat;
double lng;
s3eMapViewCoord(double _lat, double _lng) : lat(_lat), lng(_lng) {}
};
struct s3eMapViewSpan {
double latDelta;
double lngDelta;
s3eMapViewSpan(double _latDelta, double _lngDelta) : latDelta(_latDelta), lngDelta(_lngDelta) {}
};
enum s3eMapViewType {
S3E_MAPVIEW_TYPE_STANDARD,
S3E_MAPVIEW_TYPE_SATELLITE,
S3E_MAPVIEW_TYPE_HYBRID
};
// Helpers to convert references to pointers. These are required because only POD data can be passed as arguments to methods that run on the OS thread.
extern "C" {
void _s3eMapViewGoTo(s3eMapView* pMapView, const s3eMapViewCoord* center, const s3eMapViewSpan* span, bool animate);
s3eMapViewPOI* _s3eMapViewAddPOI(s3eMapView* pMapView, const s3eMapViewCoord* location, const char* title, const char* subtitle, bool clickable, void* clickData);
}
inline void s3eMapViewGoTo(s3eMapView* pMapView, const s3eMapViewCoord& center, const s3eMapViewSpan& span, bool animate)
{ _s3eMapViewGoTo(pMapView, ¢er, &span, animate); }
inline s3eMapViewPOI* s3eMapViewAddPOI(s3eMapView* pMapView, const s3eMapViewCoord location, const char* title = NULL, const char* subtitle = NULL, bool clickable = false, void* clickData = NULL)
{ return _s3eMapViewAddPOI(pMapView, &location, title, subtitle, clickable, clickData); }
functions:
s3eMapView* s3eMapViewCreate() NULL run_on_os_thread
s3eResult s3eMapViewDestroy(s3eMapView* pMapView) S3E_RESULT_ERROR run_on_os_thread
void s3eMapViewSetScreenRect(s3eMapView* pMapView, int x, int y, int w, int h) void run_on_os_thread
void s3eMapViewSetVisible(s3eMapView* pMapView, bool visible) void run_on_os_thread
void s3eMapViewSetType(s3eMapView* pMapView, s3eMapViewType type) void run_on_os_thread
void s3eMapViewSetShowUserLocation(s3eMapView* pMapView, bool show) void run_on_os_thread
void _s3eMapViewGoTo(s3eMapView* pMapView, const s3eMapViewCoord* center, const s3eMapViewSpan* span, bool animate) void run_on_os_thread
s3eMapViewPOI* _s3eMapViewAddPOI(s3eMapView* pMapView, const s3eMapViewCoord* location, const char* title, const char* subtitle, bool clickable, void* clickData) NULL run_on_os_thread
void s3eMapViewRemovePOI(s3eMapView* pMapView, s3eMapViewPOI* poi) void run_on_os_thread
const char* s3eMapViewGetPlatformLicensingString() NULL run_on_os_thread