• JMap.Map.getScale

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

    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 string

    Example

    // returns the current map scale
    // for instance : "1 : 12959346"
    JMap.Map.getScale()

    // returns the map scale for given map latitude=45.5 and zoom level = 4
    // for instance: "1 : 12959346"
    JMap.Map.getScale({
    latitude: 45.5,
    zoom: 4
    })