Welcome to mirror list, hosted at ThFree Co, Russian Federation.

api-client.h « c « src « api - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c2abea96d3e6fa23511e0ab2f4ae3c18d0cf59dd (plain)
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
#ifndef MAPSWITHME_API_CLIENT
#define MAPSWITHME_API_CLIENT

#ifdef __cplusplus
extern "C" {
#endif

/* @TODO: Finish URL Scheme API implementation and uncomment.
typedef struct
{
  double lat;
  double lon;
} MapsWithMe_Coordinate;

typedef struct
{
  double lat;
  double lon;
  char const * name;
  char const * id;
} MapsWithMe_Pin;

typedef struct
{
  char const * toolbarTitle;
  char const * backButtonTitle;
  char const * backButtonUrl;
  char const * backPinUrl;

  MapsWithMe_Pin const * pins;
  int pinsSize;

  MapsWithMe_Coordinate viewportCenter;
  double viewportZoomLevel;
} MapsWithMe_ShowMapRequest;

// Generate a url to shows a map view.
char * MapsWithMe_GenShowMapUrl(MapsWithMe_ShowMapRequest const * request);
*/

// Helper function to calculate maximum buffer size for
// MapsWithMe_GenShortShowMapUrl (with null-terminator).
int MapsWithMe_GetMaxBufferSize(int nameSize);

// Helper method to generate short url.
// Returns the number of bytes required to fit the whole URL or an error_code < 0 on error.
int MapsWithMe_GenShortShowMapUrl(double lat, double lon, double zoomLevel, char const * name, char * buf, int bufSize);

#ifdef __cplusplus
}  // Closing brace for extern "C"
#endif

#endif  // MAPSWITHME_API_CLIENT