Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Bing Map via Bing Map Connector or API? Is one way better than the other?

(0) ShareShare
ReportReport
Posted on by 150

Hi all,

 

I am learning to build mapping tools with PowerApp.  

 

I read from this tutorial.  It is using API.  

 

"https://dev.virtualearth.net/REST/V1/Imagery/Map/Road/" & EncodeUrl(txtLocation.Text) & "?mapSize=" & txtImageWidth & "," & txtImageHeight & "&key="&txtBingMapsKey.Text

 

I read this Youtube, it uses Bing Map Connector. 

 

Both methods work.   Is one better than other? 

 

It seemed to me that API way is a bit more complicated, but it is able to parse address easier as the txtLocation.Text can be street address, City, State or Country, but using the Bing Map Connector, BingMaps.GetLocationByAddress method, I need to specify street address, City, State or Country.  I cannot put City name in Street address position.  

 

Thoughts? 

 

Thanks.

 

dc7669

 

 

  • dc7669 Profile Picture
    150 on at
    Re: Bing Map via Bing Map Connector or API? Is one way better than the other?

    @v-xida-msft Thank you!  Your reply helped me understanding the difference and how each method works.  

  • Verified answer
    v-xida-msft Profile Picture
    on at
    Re: Bing Map via Bing Map Connector or API? Is one way better than the other?

    Hi @dchan1 ,

    I agree with your thought almost. In addition, there is also an known issue with the Bing Maps Imagery API.

     

    When you use Bing Maps Imagery API to render static map based on specific address (e.g. : Space Needle, Seattle), the static Bing Map may not be rendered within the Image control as below:

    6.JPG

    As an fixed solution, you must convert the specific address into a location info (Latitude, Longitude) firstly, then pass the location info in above url.

    In order to get corresponding location for a specific address, you need to use the BingMaps.GetLocationByAddress() function. The Latitude value and Longitude value for specific address should be like below (set the Text property of a Label to following😞

    BingMaps.GetLocationByAddress({addressLine: "Type Specific Address here"}).point.coordinates.combined

    so within the Image property of the Image control, you should type the following formula:

    "https://dev.virtualearth.net/REST/V1/Imagery/Map/"&drpBingImagerySets.SelectedText.Value&"/" & If(tglGPSLocation.Value = true,EncodeUrl(txtLocation.Text), EncodeUrl(BingMaps.GetLocationByAddress({addressLine: txtLocation.Text}).point.coordinates.combined)) & "/"& slZoom.Value &"?mapSize=" & txtImageWidth & "," & txtImageHeight & "&pp=" & If(tglGPSLocation.Value = true,txtLocation.Text, BingMaps.GetLocationByAddress({addressLine: txtLocation.Text}).point.coordinates.combined) & ";21;I+am+here&key="&txtBingMapsKey.Text

    7.JPG

     

    For choosing Bing Map connector or Bing Map Imagery API, it is based on your specific scenario. If above solution is helpful in your scenario, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

     

    Best regards,

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,011 Most Valuable Professional

Leaderboard