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
@v-xida-msft Thank you! Your reply helped me understanding the difference and how each method works.
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:
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
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,
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 2