• JMap.Map.getScaleDenominator

    Returns the map scale denominator, depending on screen DPI, latitude, and zoom level.

    For instance if the scale is "1 : 12959346", the denominator is the number 12959346.

    if params is passed will use the given values for latitude (center of the map) and zoom, else use map current ones.

    Note: screen DPI is fixed.

    Parameters

    • Optional params: JLatitudeAndZoom

      if passed will use the given values for latitude and zoom, else use map current values

    Returns number

    Example

    // returns the current map scale
    JMap.Map.getScaleDenominator()

    // returns the map scale for given map latitude=45.5 and zoom level = 4
    JMap.Map.getScaleDenominator({
    latitude: 45.5,
    zoom: 4
    })