I am using the Google Maps Static Map API and am able to plot multiple coordinates on my map based on a SQL table with columns for Latitude and Longitude. However, I cannot get the PATH parameter to work. Does anyone know how to use the PATH parameter correctly. I have spent a lot of time reading through Google documentation without any luck. Here is what I have:
Hi @Anonymous ,
Update: You can specify up to 25 waypoints for a route. Reference: Calculate a Route
However, I don't have any ideas to resolve this limitation. Maybe you can ask from BingMap community or seek assistance from Microsoft Support Ticket.
Hope this helpss.
Sik
This is all working for me now with the Zoom and also the line between coordinates. The only issue I am having now is the limit to 18 pushpins. When some of the routes our drivers have more than 18 lat/long coordinates. Sometimes as high as 40-50 in a given day. Any suggestions on how to handle that? Thanks for all your assistance so far, it has been great!
Hi @Anonymous ,
Yes, there is a limitation that you can specify up to 18 pushpins in the URL.
To achieve Zoom in/out function, you need to define a center point and a Zoom level after the Road before Route.
In your case, please try this, set the first point to center point, use slider control to control the zoom level.
"https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/"&First(colNumberedTrucks).Latitude&","& First(colNumberedTrucks).Longitude&"/"&Slider1.Value&"/Routes?"& Concat(colNumberedTrucks,"wp."& RowNumber & "=" & Latitude &","&Longitude&";66;" &RowNumber&"&") &"key={BingMapsAPIKey}"
Hope this helps.
Sik
I was able to get the line to print, however, sometimes the line and coordinates do not show up on Map. Is there a limit to the number of plots that can show on the map? It seems to not work when I have a lot of plots. Also, do you know how to incorporate Zoom with using a Slider control for BING maps? Thanks!
Hi @Anonymous ,
Could you please show the parsed URL by a Label shown as below?
How many waypoints do you want to display?
So far, the possible reason is that the RowNumber doesn't start at 1, since seemly the waypoints are from 58-70 shown in your DataTable. RowNumbers are the index of each waypoint in the URL, it must start at 1 and gradually increase for other waypoints, as shown below.
https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/Routes?wp.1=Seattle,WA;64;1&wp.2=Redmond,WA;66;2&key={BingMapsAPIKey}
Of course, in order to debug the problem accurately, please provide the parsed URL. you can also follow the example above to determine where your URL is wrong.
Thanks.
Sik
Sorry, forgot to attach this image showing the data is in the Collection by using DataTable.
Thank you for all your help. I tried what you said and not getting any data on my Map image. I do have data in the Collection though so not sure why it isnt showing up on Map.
Hi @Anonymous ,
So there is a table colTrucks with Latitude and Longitude column, right?
First, please try this code to add the Row Numbers for each row of colTrucks.
Clear(colNumberedTrucks);
ForAll(colTrucks,
Collect(colNumberedTrucks,
Last(FirstN(AddColumns(colTrucks,
"RowNumber",
CountRows(colNumberedTrucks)+1
),
CountRows(colNumberedTrucks)+1
)
)
)
)
Then, please try this:
"https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/Routes?"& Concat(colNumberedTrucks,"wp."& RowNumber & "=" & Latitude &","&Longitude&";66;" &RowNumber&"&") &"key="&txtBingMapsKey.Text
Hope this helps.
Sik
Thanks for all the info and documentation on Bing Maps. I have no issue using either Bing or Google; just a map that I can show routes on. I was able to get the example Bing Map to work with a route using the following code in PowerApps:
I am just not sure how to combine the custom PowerApps formula into the above Bing formula. Here is my formula Google map in PowerApps with all my coordinates plotted on the map:
"https://maps.googleapis.com/maps/api/staticmap?center= " & First(colTrucks).Latitude & "," & First(colTrucks).Longitude & "&zoom="&Slider1.Value&"&size=1340x404&key=AIzaSyB6H-z3ikRFI3RseejUY1YHf9C0_OFSFnw"&Concat(colTrucks,"&markers=size:tiny%7Ccolor:red%7Clabel:%7C" & Latitude & "," & Longitude & "&path=weight:3|color:blue" & Latitude & "," & Longitude)
Any idea how to get the Lat and Longs to work with Bing? Thank you!
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional