web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / BingMaps.GetMapV2 scal...
Power Apps
Answered

BingMaps.GetMapV2 scale in m/px

(0) ShareShare
ReportReport
Posted on by 29

Hello,
I am creating an app with BingMaps.GetMapV2. I need to know how many meters represent 1 pixel.
I am using this article Understanding Scale and Resolution - Bing Maps | Microsoft Docs and apply my latitude correction.

BTW, when I check my result with google earth it's false.
Any idea ?

Categories:
I have the same question (0)
  • BCLS776 Profile Picture
    8,994 Moderator on at

    @FlorentGiboin wrote:

    Hello,
    I am creating an app with BingMaps.GetMapV2. I need to know how many meters represent 1 pixel.
    I am using this article Understanding Scale and Resolution - Bing Maps | Microsoft Docs and apply my latitude correction.

    BTW, when I check my result with google earth it's false.
    Any idea ?


    The document you quoted is a good resource - keep that around for a handy reference. One thing to note, some of the information it describes is based on the assumption the Earth is a perfect sphere. In reality, it is better represented by an ellipsoid, so the spherical assumption can carry some error along with it. However, that level of error isn't important to most people unless you need high precision over long distances.

     

    First, tell us a bit more about your app and its purpose. Are you trying to calculate scale for some sort of precise positioning task, or is it to help your user understand what 50 metres or 20 kilometres looks like on the map? When you say you "check my result with google earth it's false", can you share more info? Is it giving you a slightly imprecise calculation, or is it grossly misstating what you believe is the true answer?

     

    Seeing the code you are using so far can also help us spot any missteps.

     

    Bryan

     

     

     

  • FlorentGiboin Profile Picture
    29 on at

    My goal is to let user select a point in the map then store the coordinate.


    I am already able to let user select a point. And I am able to get pixel Y/X based on the center of image.
    Without knowing the scale (meters/px) I can't determine point GPS coordinate. For my test, I use this formula

     

    BingMaps.GetMapV2("Road",14,49.88125 ,2.31831,{mapSize:"1366,768",pushpinIconStyle:121,pushpinLatitude: 49.881121,pushpinLongitude: 2.284551})

     

    Real distance is 2418.92 meters.

    Number of pixel is -393 pixel.
    Base on the documentation zoom 14, raw pixel 9.55, converted latitude 8.853675285

    393 * 8.853 =3.479m
    So there is a problem.

  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    I think the issue may be with how you are calculating the latitude correction. I found the cosine of 49.88 degrees to be 0.6444, which yields a resolution of 6.15m/pixel at that zoom level. 6.15 x 393 works out very close to the distance you measured in Google Earth.

     

    If you are using a cosine function in Power Apps or Excel, its argument needs to be in radians and not degrees.

     

    Hope that helps,

    Bryan

  • FlorentGiboin Profile Picture
    29 on at

    Radian VS Degrees, it might be the answer ^^.
    Thx a lot

  • FlorentGiboin Profile Picture
    29 on at

    With that collection it's working, once degree transformed in radian.

    With({multi:Cos((Location.Latitude*Pi()/180))}
    ,ClearCollect(zoomLevel,
    {val:14, meters:9.55*multi},
    {val:15, meters:4.78*multi},
    {val:16, meters:2.39*multi},
    {val:17, meters:1.19*multi},
    {val:18, meters:0.6*multi},
    {val:19, meters:0.3*multi})
    );
  • rbrundritt Profile Picture
    4 on at

    Bing Maps uses a Mercator map projection with 256x256 pixel tiles. If you know the zoom level and the latitude value of the center of the map (or the point you are interested in) and calculate the distance in meters per pixel using the formula: `(cos(latitude * pi/180) * 2 * pi * 6378137) / (256 * 2^zoom)`. This is documented here as the ground resolution: Bing Maps Tile System - Bing Maps | Microsoft Learn

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard