0

I have added the below code to an image on my PowerApps canvas, if I add one pin it displays on the image/map but if i add 2 pins they don't display. im sure I've written it wrong or missed something...hopefully its not a limitation?

any help would be great

BingMaps.GetMapV2( "Road", 15, 51.388474, 0.193718, { pushpins: [ { pushpinIconStyle: 46, pushpinLabel: "1", pushpinLatitude: 51.387918, pushpinLongitude: 0.191583 }, { pushpinIconStyle: 46, pushpinLabel: "2", pushpinLatitude: 51.387912, pushpinLongitude: 0.191582 } ] } )

1 Answers1

0

I don't remember the BingMaps.GetMapv2 in power apps. Digging into this it looks like you are loading a static map through the Bing Maps connector. It looks like this function only allows a single pushpin to be specified, thus your issue. Note that this connector is a thin and apparently, limited, wrapper around the Bing Maps Imagery REST API. With that in mind, you would need to simple generate the REST API url for the image you want using this API directly. Here is a blog post on how to do this: https://powerapps.microsoft.com/it-it/blog/image-control-static-maps-api/

If you decided to add more than a couple of pins, you may want to consider making the map interactive for a better user experience. The Power Apps team added built in maps capabilities using Azure Maps. Here are the docs on how to do that in power apps: https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/geospatial-component-map

rbrundritt
  • 16,570
  • 2
  • 21
  • 46