Open jmullaney2003 opened 4 years ago
Hi, so Glop is a set of convenience methods for (HTML) canvas operations, including a draw
function, resizing, and some events stuff:
https://github.com/jywarren/cartagen/blob/master/src/glop/glop.js
Map has most of the map projection and lat/lon coord math utility functions.
https://github.com/jywarren/cartagen/blob/master/src/mapping/map.js
Viewport manages the rectangle that is being viewed through the browser window frame, and because Cartagen typically works in vector tiles, it also tracks the vector tiles which intersect with the browser viewport frame, so we can do efficient "culling" of data to render.
I hope this helps!
There is a gap between the wiki and the source code. The wiki contains some explanations about specific classes, and, of course, the source contains everything. I don't see the relationship between classes. I’m having trouble grasping a basic theory of operation.
Example: what is the difference (or relationship) between the Map, Glop, and Viewport? In particular, what is difference between Map.draw() and Glop.draw();