MapSize calculation and Maphelper

Feb 27, 2012 at 9:44 AM
Edited Feb 27, 2012 at 9:59 AM
Your current approach is based upon the assumption that a map has several map lods and the given scale is calculated upon this dependency, right? (Maybe because the DeepEarth relation of this project.)
        public static double MapSize(double levelOfDetail)
            return 256.0 * Math.Pow(2, levelOfDetail);
This aproach fits to most common web based applications like bing and google maps.

But I think the map size should be a map unit dependent value based upon width and height of the current view, don't you think so? Doing the calculation the way above would not (easyly) allow the usage in free scalable maps without static dependency between scale and lod using which uses wpf/silverlight, too.

I think, making the MapHelper an injectable implementation object would also improve the extendability, e.g. if someone want's to use Vincenty's algorithm instead of haversine.