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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Bing Maps Connector - ...
Power Apps
Unanswered

Bing Maps Connector - how to limit requests?

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I'm using Bing Maps Connector (https://docs.microsoft.com/en-us/connectors/bingmaps/#get-static-map).

I've created an image, and put

BingMaps.GetMapV2(
 "CanvasLight";
 16;
 Location.Latitude;
 Location.Longitude;
 {
 pushpinLatitude: Location.Latitude;
 pushpinLongitude: Location.Longitude;
 pushpinIconStyle: 37
 }
)

I've now realised that his makes loads of API calls to Bing Maps - for 3 users, we've exceeded 2500 calls in total, as the image keeps refreshing. How would I limit the number of requests to 1? So to make sure that the image is only loaded once, even if the user is moving? 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    36,383 Super User 2025 Season 2 on at

    Hi @Anonymous 

    A possible workaround could be to retrieve your image when your app starts, and to store the result in a variable. Here's what to add to the OnStart property.

     

    Set(varMap;
     BingMaps.GetMapV2(
     "CanvasLight";
     16;
     Location.Latitude;
     Location.Longitude;
     {
     pushpinLatitude: Location.Latitude;
     pushpinLongitude: Location.Longitude;
     pushpinIconStyle: 37
     }
     )
    )

    You would then set the image property of your image control to varMap. By doing this, you'll only call Bing Maps when your app starts.

  • Community Power Platform Member Profile Picture
    on at

    Works like a charm, thanks @timl !

  • Community Power Platform Member Profile Picture
    on at

    One more question - now it sometimes happens that the image doesn't load.

    I'm setting the variable a couple times during the app, and it only starts working after the variable has ben set twice or three times. Any ide why that would happen, and how to make sure it gets set?

    Thanks!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard