#ifndef GOOGLEPROJECTION_H #define GOOGLEPROJECTION_H #include using std::vector; #include #define max(a,b) (((a)>(b))?(a):(b)) #define min(a,b) (((a)<(b))?(a):(b)) struct ScreenPos { int x,y; ScreenPos() { x=y=0; } ScreenPos(int x,int y) { this->x=x; this->y=y; } }; struct EarthPoint { double x,y; EarthPoint() { x=y=0.0; } EarthPoint(double x,double y) { this->x=x; this->y=y; } }; class GoogleProjection { private: vector Bc,Cc,zc,Ac; int levels; double minmax (double a,double b, double c) { a = max(a,b); a = min(a,c); return a; } public: GoogleProjection(int levels=18) { this->levels=levels; double c = 256; double e; for (int d=0; d