1 #ifndef _GoogleMaps_GoogleMaps_h
2 #define _GoogleMaps_GoogleMaps_h
3 
4 #include <CtrlLib/CtrlLib.h>
5 
6 using namespace Upp;
7 
8 #define LAYOUTFILE <GoogleMaps/GoogleMaps.lay>
9 #include <CtrlCore/lay.h>
10 
11 #define IMAGECLASS GoogleMapsImg
12 #define IMAGEFILE <GoogleMaps/GoogleMaps.iml>
13 #include <Draw/iml_header.h>
14 
15 void   SetGoogleMapsKey(const char *key);
16 String GetGoogleMap(double center_x, double center_y, int zoom, int cx, int cy,
17                     const char *format = "png", String *error = NULL);
18 Image  GetGoogleMapImage(double center_x, double center_y, int zoom, int cx, int cy,
19                          const char *format = "png", String *error = NULL);
20 double CvDeg(double deg, double minutes, double seconds);
21 
22 Pointf GoogleMapsPixelToGps(Pointf center, int zoom, Point diff);
23 Pointf GoogleMapsPixelToGps(Pointf center, int zoom, Size sz, Point p);
24 Pointf GoogleMapsGpsToPixelDiff(Pointf center, int zoom, Pointf gps);
25 Pointf GoogleMapsGpsToPixel(Pointf center, int zoom, Size sz, Pointf gps);
26 
27 Pointf ScanGPS(const char *s);
28 
29 String FormatGPSX(double x);
30 String FormatGPSY(double y);
31 String FormatGPS(Pointf p);
32 
33 bool MapDlg(Pointf& p);
34 
35 #endif
36