Search code examples
androidosmdroidmapquest

What are the map scales related to mapquest's zoomlevels?


In my Android project im using mapquest data with OSMdroid. I would like to know what map scales the zoomlevels provide (e.g. 1:10000 etc.). I just found zoomlevel to scale depending on DPI (Is the map's scale also depending on the width and height of the map view, that I am showing?). If I use the mapquest map site, I just see a mapscale in the bottom left corner, but not in a ratio like 1:10000, which I actually need.

What are the scales 1:x at zoomlevel 16,15,14 ?


Solution

  • There are a few things going on here. Let me step through it as I understand it.

    First, I believe what you are seeing in the Mapquest link is the ratio. So for zoomlevel 16,15,14:

    14 = 1:27083
    15 = 1:13541
    16 = 1:6770

    Although the link doesn't specify it, that should be in meters. So in zoom level 14, every pixel represents 27083 meters.

    Additionally, the Bing maps ratios are found here. They are pretty close to the numbers that Mapquest reports, but they are not the same.

    So, why are the numbers different? Because the meters-per-pixel ratio changes depending on what latitude you are at. Because of the distortion the Mercator projection produces, the meters-per-pixel is not constant as you change latitude. The Bing maps values are the values at the equator. I don't know where the Mapquest values come from.

    Finally - to calculate meters-per-pixel in osmdroid you can call:

    TileSystem.GroundResolution(latitude, zoomLevel);
    

    And that will give you meters-per-pixel for a specific latitude. I recommend you take a look at osmdroid's ScaleBarOverlay for an example of how to apply this information.