You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.5 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. *
  3. * This file is part of QMapControl,
  4. * an open-source cross-platform map widget
  5. *
  6. * Copyright (C) 2007 - 2008 Kai Winter
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Lesser General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public License
  19. * along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. * Contact e-mail: kaiwinter@gmx.de
  22. * Program URL : http://qmapcontrol.sourceforge.net/
  23. *
  24. */
  25. #include "googlemapadapter.h"
  26. GoogleMapAdapter::GoogleMapAdapter( googleLayerType qLayerType )
  27. : TileMapAdapter("mt1.google.com", "/vt/v=ap.106&hl=en&x=%2&y=%3&zoom=%1&lyrs=" + typeToString(qLayerType), 256, 17, 0)
  28. //: TileMapAdapter("tile.openstreetmap.org", "/%1/%2/%3.png", 256, 0, 17)
  29. {
  30. QString layerType = typeToString( qLayerType );
  31. }
  32. GoogleMapAdapter::~GoogleMapAdapter()
  33. {
  34. }
  35. QString GoogleMapAdapter::typeToString( googleLayerType qLayerType )
  36. {
  37. switch (qLayerType)
  38. {
  39. case satellite: return "s";
  40. case terrain: return "t";
  41. case hybrid: return "h";
  42. case roadmap:
  43. default:
  44. return "m";
  45. }
  46. }