Skip to content

green-anger/GlobeViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is GlobeViewer?

GlobeViewer allows you to view popular online maps not in Mercator but Orthographic projection. Greenland will never be larger than Australia again. In addition to viewing tiles GlobeViewer caches them. So viewed once the tiles will be available to you afterwards even offline! Currently it supports OpenStreetMap and 2GIS tiles.

Keep in mind that the tiles are not changed, so switching to another projection (from Mercator to Orthographic) will distort them a bit. But all symbols remain readable at all zoom levels.

How to use it

GlobeViewer is designed to be used as a library in any application than can create OpenGL context. Currently it has only been tested with GLFW. You can find corresponding example next door.

If you have build the library (and all its dependencies in case of static build), you can easily use it in your project by adding single header GlobeViewer.h. And that's it. Just call API methods from your application.

Provided example controls

GLFW example has the following controls:

  • Hold left mouse button and drag to move the Globe
  • Hold left mouse button, hold Shift key and drag to rotate the Globe
  • Scroll mouse wheel up to zoom in
  • Scroll mouse wheel down to zoom out
  • Press key 'C' to place the Globe in window center
  • Press key 'B' to rotate the Globe so that projection center is at [0, 0]
  • Press key 'P' to rotate the Globe so that projection center is at the current mouse cursor position if it's inside the Globe, ignore otherwise
  • Press key 'T' to toggle between two tile servers
  • Press key '1' to toggle display of wire-frame
  • Press key '2' to toggle display of map tiles
  • Press Escape to exit

Highlights

Here is a short video that can give you the first impression of what the application is capable of:

Vimeo link

Screenshots

The Globe The North Pole The South Pole Melbourne from far away Melbourne from not so far away Melbourne at zoom level 19

Documentation

Library is fully documented with Doxygen. Docs can be easily generated from provided Doxyfile: if you have Doxygen installed go to doc directory and call 'doxygen' without parameters. If you don't have Graphviz installed in Doxyfile make sure HAVE_DOT is set to NO: HAVE_DOT = NO Or just comment it out as 'NO' is a default value: #HAVE_DOT = YES

Dependencies

General:

  • C++14

Embedded into the source code:

Library

GLFW example:

Versioning

GlobeViewer uses Semantic Versioning 2.0.0.

License

GlobeViewer is licensed under MIT License.