cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Bing Maps Static Map with other points using image control

Hi there,

 

I'm trying to use this formula to show two points on a static Bing Map:

 

https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/Routes?wp.0=Seattle,WA;64;1&wp.1=Redmond,WA;66...}

 

I would like the text for wp.0 to be the text in a textbox on the screen and wp.1 to be the Title in a gallery on the screen.

 

When I type this into the formula bar, the map returned is blank:

 

"https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/Routes?wp.0="&txtLocation.Text;64;1&"wp.1="&Ga...

 

Also, the blank image is a 350 x 350 pixels, 600 x 1200 pixels, which is the size of another map in the app I built, using this method.

 

Help:

  • Ideally, I would like to make the map I created using these steps include pushpins for all other locations in the displayed gallery, along with the location in the text box (txtlocation)
  • I would be fine if initially, only the image from the text box were on the map, and then a pin were dropped based on the tile clicked in the gallery.
  • Worst case scenario, on selecting a tile in the gallery, I would like to navigate to a new page with waypoint map (the txtlocation being the start point and the title from the gallery tile being the end point)
    • If I had to use this option, I would want it to be the same size as the other map (600 x 1200)
2 REPLIES 2
Community Support
Community Support

Hi @Kat_YESPrep ,

Do you want to use bing maps and drawing some points in the map?

Bing Maps supports multiple imagerySets. Lets add a dropdown to see the effect of changing these imagerySets.

Insert > Controls > Dropdown to add a dropdown. Rename the control to drpBingImagerySets. Set the Items property to the following:

["Road","Aerial", "AerialWithLabels", "AerialWithLabelsOnDemand", "CanvasDark", "CanvasLight", "CanvasGray"]

 

Change the formula in the Image property of the imgMapControl to include the imagerySet option :

 

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

 

Here are docs about it for your reference:

https://powerapps.microsoft.com/en-us/blog/image-control-static-maps-api/

https://www.sharepointsiren.com/2019/03/plotting-multiple-map-points-in-powerapps/

https://docs.microsoft.com/en-us/bingmaps/rest-services/imagery/get-a-static-map#get-a-map-with-road...

 

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi there,

 

I'm fine with the default view. When a user clicks an item in the Gallery, I would like to use the Get Route function of the Bing Maps API to show the route between the address in the Text bar and the address in the gallery item.

 

When I post the URL into a browser, it shows just fine, but when I put the formula in the formula bar and click, a blank map is returned.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (4,983)