theCrag/website — Issue #421: In map summary api return nodes of a certain physical size instead of TLCs
Author: brendanheywood
Created: 2011-12-07 00:04:03+00:00
State: open
Labels: API, Enhancement, Maps

The map/summary api end point returns nodes which are flagged as a top level node. Instead change this to return the list of nodes which are as big as possible but no bigger than X.

Currently the cut off point for loading the next level of detail for a zoom level of 10 in google maps. An area with a physical size of around 50 km's will still look good at this size and smoothly split into sub clusters when zoomed. Both the physical dimension of 50kms and the zoom level of 50 can be tuned.

Note that the measurement in Km's can be skewed at high or low latitudes. If you want something quicker to calculate we could use a minimum width or hight measured in degrees instead of kms. A threshold of .1 degree might be a good start and we can tune from there.

Tests:
Grampians should not be returned, instead probably return it's 7 children instead.

The sydney crags should probably not be returned, instead return a larger ancestor such as 'North West' - but will depend on tuning levels.